From d96887f9093c0e822cb5009e3d4726f2aa4f1050 Mon Sep 17 00:00:00 2001 From: Sim Ho Date: Mon, 19 Dec 2022 12:54:54 -0500 Subject: [PATCH] Note that leaves must be inline elements (#5225) * Note that leaves must be inline elements * remove extra space --- docs/walkthroughs/04-applying-custom-formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/walkthroughs/04-applying-custom-formatting.md b/docs/walkthroughs/04-applying-custom-formatting.md index e2dd87a6c..7208c802c 100644 --- a/docs/walkthroughs/04-applying-custom-formatting.md +++ b/docs/walkthroughs/04-applying-custom-formatting.md @@ -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.