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): void

Parameters:

ParameterTypeDescription
anchorEditorPositionThe anchor position of the selection.
headEditorPositionThe head position of the selection.
options?SetSelectionOptionsThe selection options.

Returns: void