mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 11:42:53 +02:00
GitBook: [main] 58 pages and 7 assets modified
This commit is contained in:
committed by
gitbook-bot
parent
15966086d4
commit
a38957b849
23
docs/api/locations/point-ref.md
Normal file
23
docs/api/locations/point-ref.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# 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.
|
||||
|
||||
```typescript
|
||||
interface PointRef {
|
||||
current: Point | null
|
||||
affinity: 'forward' | 'backward' | null
|
||||
unref(): Point | null
|
||||
}
|
||||
```
|
||||
|
||||
* [Static methods](point-ref.md#static-methods)
|
||||
* [Transform methods](point-ref.md#trasnform-methods)
|
||||
|
||||
## Static methods
|
||||
|
||||
### Transform methods
|
||||
|
||||
#### `PointRef.transform(ref: PointRef, op: Operation)`
|
||||
|
||||
Transform the point refs current value by an `op`.
|
||||
|
Reference in New Issue
Block a user