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

Add descriptions of affinity to PathRef, PointRef and RangeRef documentation

This commit is contained in:
Sunny Hirai
2022-04-10 15:31:43 -07:00
parent e7aa292323
commit daa68dab89
3 changed files with 3 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
# PathRef API
`PathRef` objects keep a specific path 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 `Path` value.
When you no longer need to track this location, call `unref()` to free the resources.
`PathRef` objects keep a specific path in a document synced over time as new operations are applied to the editor. It is created using the `Editor.pathRef` method. You can access their property `current` at any time for the up-to-date `Path` value. When you no longer need to track this location, call `unref()` to free the resources. The `affinity` refers to the direction the `PathRef` will go when a user inserts content at the current position of the `Path`.
```typescript
interface PathRef {