1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-27 00:54:22 +02:00

Update 04-transforms.md

This commit is contained in:
Ian Storm Taylor
2021-04-12 14:14:31 -04:00
committed by GitHub
parent 8c3c7ada87
commit 68e39215bb

View File

@@ -162,8 +162,9 @@ Instead, you can take advantage of the `at` and `match` options to match all of
Transforms.moveNodes(editor, {
// This will again be expanded to a range of the entire node at `[2]`.
at: [2],
// Nodes with a path of 1 longer are the children.
// Matches nodes with a longer path, which are the children.
match: (node, path) => path.length === 2,
to: [5],
})
```