Skip to content

CodeMirrorEditor.setSelection method

CodeMirrorEditor › setSelection

Unofficial

Set the selection to the given anchor and head positions.

Signature:

setSelection(anchor: EditorPosition, head: EditorPosition, options?: SetSelectionOptions | undefined): void

Parameters:

Parameter Type Description
anchor EditorPosition The anchor position of the selection.
head EditorPosition The head position of the selection.
options? SetSelectionOptions | undefined The selection options.

Returns: void