From 3c80c3e88b4df97687477062bdc130e2d344e7d9 Mon Sep 17 00:00:00 2001 From: Kevin Simons Date: Wed, 13 May 2020 17:56:24 +0200 Subject: [PATCH] Fix a few issues with the documentation (#3679) * Fix a few issues with the documentation * Add Kitemaker to the list of sites using Slate --- docs/concepts/02-nodes.md | 2 +- docs/concepts/07-plugins.md | 2 +- docs/general/resources.md | 1 + docs/walkthroughs/02-adding-event-handlers.md | 2 +- docs/walkthroughs/04-applying-custom-formatting.md | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/concepts/02-nodes.md b/docs/concepts/02-nodes.md index 6454bbd1a..22bb9efba 100644 --- a/docs/concepts/02-nodes.md +++ b/docs/concepts/02-nodes.md @@ -107,7 +107,7 @@ But in certain cases, like for links, you might want to make them "inline" flowi You can define which nodes are treated as inline nodes by overriding the `editor.isInline` function. (By default it always returns `false`.) Note that inline nodes cannot be the first or last child of a parent block, nor can it be next to another inline node in the children array. Slate will automatically space these with `{ text: '' }` children by default with [`normalizeNode`](https://docs.slatejs.org/concepts/10-normalizing#built-in-constraints). -Elements can either contain block elements as children. Or they can contain inline elements intermingled with text nodes as children. But elements **cannot** contain some children that are blocks and some that are inlines. +Elements can either contain block elements or inline elements intermingled with text nodes as children. But elements **cannot** contain some children that are blocks and some that are inlines. ## Voids diff --git a/docs/concepts/07-plugins.md b/docs/concepts/07-plugins.md index bf9313c9d..269e3d7b5 100644 --- a/docs/concepts/07-plugins.md +++ b/docs/concepts/07-plugins.md @@ -11,7 +11,7 @@ const withImages = editor => { const { isVoid } = editor editor.isVoid = element => { - return element.type === 'image' ? true : isVoid(editor) + return element.type === 'image' ? true : isVoid(element) } return editor diff --git a/docs/general/resources.md b/docs/general/resources.md index 4bb13f139..549859c07 100644 --- a/docs/general/resources.md +++ b/docs/general/resources.md @@ -20,6 +20,7 @@ These products use Slate, and can give you an idea of what's possible: - [Grafana](https://grafana.com/) - [Guilded](https://www.guilded.gg) - [Guru](https://www.getguru.com/) +- [Kitemaker](https://kitemaker.co) - [Netlify CMS](https://www.netlifycms.org) - [Outline](https://www.getoutline.com/) - [Prezly](https://www.prezly.com/) diff --git a/docs/walkthroughs/02-adding-event-handlers.md b/docs/walkthroughs/02-adding-event-handlers.md index f0cb126e6..d3078cc47 100644 --- a/docs/walkthroughs/02-adding-event-handlers.md +++ b/docs/walkthroughs/02-adding-event-handlers.md @@ -86,4 +86,4 @@ const App = () => { With that added, try typing `&`, and you should see it suddenly become `and` instead! -This offers a sense of what can be done with Slate's event handlers. Each one will be called with the `event` object, and the `editor` that lets you perform commands. Simple! +This offers a sense of what can be done with Slate's event handlers. Each one will be called with the `event` object, and you can use your `editor` to perform commands in response. Simple! diff --git a/docs/walkthroughs/04-applying-custom-formatting.md b/docs/walkthroughs/04-applying-custom-formatting.md index 49d251bc9..d722121b0 100644 --- a/docs/walkthroughs/04-applying-custom-formatting.md +++ b/docs/walkthroughs/04-applying-custom-formatting.md @@ -134,7 +134,7 @@ const Leaf = props => { Pretty familiar, right? -And now, let's tell Slate about that leaf. To do that, we'll pass in the `renderLeaf` prop to our editor. Also, let's allow our formatting to be toggled by adding active-checking logic. +And now, let's tell Slate about that leaf. To do that, we'll pass in the `renderLeaf` prop to our editor. ```jsx const App = () => {