mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 02:49:56 +02:00
Adds documentation for PathRef (#4740)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# RangeRef API
|
||||
|
||||
`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.
|
||||
When you no longer need to track this location, call `unref()` to free the resources.
|
||||
|
||||
```typescript
|
||||
interface RangeRef {
|
||||
@@ -38,5 +39,5 @@ It also returns the current value.
|
||||
|
||||
#### `RangeRef.transform(ref: RangeRef, op: Operation)`
|
||||
|
||||
Transform the range refs current value by an `op`.
|
||||
Rarely needed, as the RangeRef is updated when the editor is updated.
|
||||
Transform the range refs current value by an `op`.
|
||||
The editor calls this as needed, so normally you won't need to.
|
||||
|
Reference in New Issue
Block a user