Ref
objects store up-to-date references to a Point
or Range
object in the document.
PointRef
objects keep a specific point in a document synced over time as new operations are applied to the editor. You can access their property current
at any time for the up-to-date Point
value.
interface PointRef {current: Point | nullaffinity: 'forward' | 'backward' | nullunref(): Point | null}
Transform the point refs current value by an op
.
RangeRef
objects keep a specific range in a document synced over time as new operations are applied to the editor. You can access their property current
at any time for the up-to-date Range
value.
interface RangeRef {current: Range | nullaffinity: 'forward' | 'backward' | 'outward' | 'inward' | nullunref(): Range | null}
Transform the range refs current value by an op
.