Skip to content

Doc.addSelection method

Doc › addSelection

Unofficial

Adds a new selection to the existing set of selections.

Signature:

addSelection(anchor: Position, head?: Position | undefined): void

Parameters:

ParameterTypeDescription
anchorPositionThe anchor position.
head?Position | undefinedThe optional head position.

Returns: void