setSelection
setSelection(
editor
,start
,end
,direction?
):void
Defined in: utils/index.ts:157
Sets the selection for the textarea
and synchronously runs the selectionChange listeners.
If you don’t want to synchronously run the listeners, use textarea.setSelectionRange
instead.
Parameters
Section titled “Parameters”editor
Section titled “editor”Editor you want to change the selection of.
number
New selectionStart.
number
= start
New selectionEnd. Defaults to start
.
direction?
Section titled “direction?”New direction.
"backward"
| "forward"
| "none"
Returns
Section titled “Returns”void