1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 09:13:24 +01:00
slate/docs/api/range-ref.md

604 B

RangeRef

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 | null
  affinity: 'forward' | 'backward' | 'outward' | 'inward' | null
  unref(): Range | null
}

Static methods

Transform methods

RangeRef.transform(ref: RangeRef, op: Operation)

Transform the range refs current value by an op.