1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 19:52:32 +02:00

Note that leaves must be inline elements (#5225)

* Note that leaves must be inline elements

* remove extra space
This commit is contained in:
Sim Ho
2022-12-19 12:54:54 -05:00
committed by GitHub
parent 0141f68365
commit d96887f909

View File

@@ -133,7 +133,7 @@ const Leaf = props => {
}
```
Pretty familiar, right?
Pretty familiar, right? Note that it is described with a `span` - This is because all leaves must be an [inline element](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements). You can learn more about leaves in the [Rendering section](../concepts/09-rendering.md#leaves).
And now, let's tell Slate about that leaf. To do that, we'll pass in the `renderLeaf` prop to our editor.