1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 11:42:53 +02:00

Clarifies docs for RangeRef & PointRef; fixes TOC for Editor API (#4724)

This commit is contained in:
Doug Reeder
2021-12-10 07:53:37 -05:00
committed by GitHub
parent 0334851cb1
commit e04671ffe8
4 changed files with 41 additions and 3 deletions

View File

@@ -10,9 +10,17 @@ interface PointRef {
}
```
- [Instance methods](point-ref.md#instance-methods)
- [Static methods](point-ref.md#static-methods)
- [Transform methods](point-ref.md#trasnform-methods)
## Instance methods
#### `unRef() => Point`
Call this when you no longer need to sync this point.
It also returns the current value.
## Static methods
### Transform methods
@@ -20,3 +28,4 @@ interface PointRef {
#### `PointRef.transform(ref: PointRef, op: Operation)`
Transform the point refs current value by an `op`.
Rarely needed, as the PointRef is updated when the editor is updated.