mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 11:42:53 +02:00
Update 10-normalizing.md (#3721)
Add `Transforms` to slate import so code runs when copy/pasted 😃
This commit is contained in:
@@ -31,7 +31,7 @@ To do this, you extend the `normalizeNode` function on the editor. The `normaliz
|
|||||||
For example here's a plugin that ensures `paragraph` blocks only have text or inline elements as children:
|
For example here's a plugin that ensures `paragraph` blocks only have text or inline elements as children:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { Element, Node } from 'slate'
|
import { Transforms, Element, Node } from 'slate'
|
||||||
|
|
||||||
const withParagraphs = editor => {
|
const withParagraphs = editor => {
|
||||||
const { normalizeNode } = editor
|
const { normalizeNode } = editor
|
||||||
|
Reference in New Issue
Block a user