mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 17:39:57 +02:00
Fix a few issues with the documentation (#3679)
* Fix a few issues with the documentation * Add Kitemaker to the list of sites using Slate
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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/)
|
||||
|
@@ -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!
|
||||
|
@@ -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 = () => {
|
||||
|
Reference in New Issue
Block a user