mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 05:42:00 +02:00
update leaf text nodes concept
This commit is contained in:
parent
ab12518a4b
commit
1415b54b44
@ -17,7 +17,7 @@ Each `Document`, `Block` and `Inline` node implements a [`Node`](../reference/mo
|
||||
|
||||
### Leaf Text Nodes
|
||||
|
||||
One constraint of Slate documents is that the leaf nodes are always `Text` nodes. No `Block` or `Inline` node will ever have no children. It will always have at least an empty text node.
|
||||
One constraint of Slate documents is that the leaf nodes are always `Text` nodes. No `Block` or `Inline` node will ever have no children. It will always have at least an empty text node. (However, you can _render_ text-less nodes, see the [Void Nodes](#void-nodes) section below!)
|
||||
|
||||
This constraint means that [`Selections`](../reference/models/selection.md) can always refer to text nodes, and many text-node-level operations are always "safe" regardless of the tree's structure.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user