Skip to content

SelectionRange.map method

SelectionRange › map

Official

Map this range through a change, producing a valid range in the updated document.

Signature:

map(change: ChangeDesc, assoc?: number | undefined): SelectionRange

Parameters:

ParameterTypeDescription
changeChangeDescThe change description.
assoc?number | undefinedWhich side the position is associated with.

Returns: SelectionRangeThe mapped selection range.