The gadget's a bit of a muddle for a simple drop-in of:
$currentFocused = $( '#wpTextbox1' );
if ( $currentFocused.length ) {
$currentFocused.textSelection(
'encapsulateSelection', {
pre: start,
peri: '',
post: end
}
);
}
Sorry.
The gadget's a bit of a muddle for a simple drop-in of:
$currentFocused = $( '#wpTextbox1' );
if ( $currentFocused.length ) {
$currentFocused.textSelection(
'encapsulateSelection', {
pre: start,
peri: '',
post: end
}
);
}
Sorry.