1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-01 03:11:44 +02:00
This commit is contained in:
Sunny Hirai
2021-04-01 18:13:48 -07:00
45 changed files with 733 additions and 911 deletions

View File

@@ -0,0 +1,22 @@
# 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.
```typescript
interface RangeRef {
current: Range | null
affinity: 'forward' | 'backward' | 'outward' | 'inward' | null
unref(): Range | null
}
```
- [Static methods](range-ref.md#static-methods)
- [Transform methods](range-ref.md#transform-methods)
## Static methods
### Transform methods
#### `RangeRef.transform(ref: RangeRef, op: Operation)`
Transform the range refs current value by an `op`.