1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 17:23:07 +01:00
slate/docs/api/locations/point-ref.md
Sunny Hirai a47c35cd95 merge
2021-04-01 18:13:48 -07:00

603 B

PointRef

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

Static methods

Transform methods

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

Transform the point refs current value by an op.