mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
update docs
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
# Ref
|
||||
|
||||
`Ref` objects store up-to-date references to a `Point` or `Range` object in the document. They are named `PointRef` and `RangRef`.
|
||||
|
||||
- [PointRef](./api/point-ref.md)
|
||||
- [RangeRef](./api/range-ref.md)
|
@@ -4,6 +4,8 @@ Slate's data structure is immutable, so you can't modify or delete nodes directl
|
||||
|
||||
Slate's transform functions are designed to be very flexible, to make it possible to represent all kinds of changes you might need to make to your editor. However, that flexibility can be hard to understand at first.
|
||||
|
||||
> 🤖 Check out the [Transforms](../api/transforms.md) reference for a full list of Slate's transforms.
|
||||
|
||||
## Selection Transforms
|
||||
|
||||
Selection-related transforms are some of the simpler ones. For example, here's how you set the selection to a new range:
|
||||
@@ -27,8 +29,6 @@ Transforms.move(editor, {
|
||||
})
|
||||
```
|
||||
|
||||
> 🤖
|
||||
|
||||
## Text Transforms
|
||||
|
||||
Text transforms act on the text content of the editor. For example, here's how you'd insert a string of text as a specific point:
|
||||
@@ -50,8 +50,6 @@ Transforms.delete(editor, {
|
||||
})
|
||||
```
|
||||
|
||||
> 🤖
|
||||
|
||||
## Node Transforms
|
||||
|
||||
Node transforms act on the individual element and text nodes that make up the editor's value. For example you could insert a new text node at a specific path:
|
||||
@@ -77,8 +75,6 @@ Transforms.moveNodes(editor, {
|
||||
})
|
||||
```
|
||||
|
||||
> 🤖
|
||||
|
||||
## The `at` Option
|
||||
|
||||
Many transforms act on a specific location in the document. By default, they will use the user's current selection. But this can be overridden with the `at` option.
|
||||
|
Reference in New Issue
Block a user