Skip to content

Doc.setSelection method

Doc › setSelection

Unofficial

Sets the selection range.

Signature:

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

Parameters:

ParameterTypeDescription
anchorPositionThe anchor position.
head?Position | undefinedThe optional head position.
options?Cm5SelectionOptions | undefinedOptional selection options.

Returns: void