1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 10:29:48 +02:00

Documents use of Editor.withoutNormalizing in conjunction with normalization (#4737)

This commit is contained in:
Doug Reeder
2021-12-17 00:15:22 -05:00
committed by GitHub
parent 3c07a8706e
commit 5d3eccf262
3 changed files with 41 additions and 1 deletions

View File

@@ -230,3 +230,8 @@ Transform.setNodes(
When performing transforms, if you're ever looping over nodes and transforming them one at a time, consider seeing if `match` can solve your use case, and offload the complexity of managing loops to Slate instead.
The `match` function can examine the children of a node, in `node.children`, or use `Node.parent` to examine its parent.
## Transforms and Normalization
Sequences of Transforms may need to be wrapped in [`Editor.withoutNormalizing`](../api/nodes/editor.md#editorwithoutnormalizingeditor-editor-fn---void--void) if the node tree should _not_ be normalized between Transforms.
See [Normalization - Implications for Other Code](./11-normalizing.md#implications-for-other-code);