Skip to content

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.

PrismEditor

Editor you want to change the selection of.

number

New selectionStart.

number = start

New selectionEnd. Defaults to start.

New direction.

"backward" | "forward" | "none"

void