Skip to content

Doc.setSelection method

Doc › setSelection

Unofficial

Sets the selection range.

Signature:

setSelection(anchor: Position, head?: Position, options?: Cm5SelectionOptions): void

Parameters:

ParameterTypeDescription
anchorPositionThe anchor position.
head?PositionThe optional head position.
options?Cm5SelectionOptionsOptional selection options.

Returns: void