1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 02:49:56 +02:00

GitBook: [main] 58 pages and 7 assets modified

This commit is contained in:
Ian Storm Taylor
2021-04-01 23:20:52 +00:00
committed by gitbook-bot
parent 15966086d4
commit a38957b849
51 changed files with 855 additions and 991 deletions

View File

@@ -0,0 +1,23 @@
# 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`.