mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 17:53:59 +02:00
Add way to prevent data loss in normalizeNode
(#5878)
* fix(docs): Consider passed options when overriding normalizeNode * feat: Allow to prevent data-loss on normalizeNode When overriding normalizeNode, you can specify a `wrapperElement` that is used to wrap text & inline nodes which would otherwise be deleted in the normalization path if they are not allowed. * changeset
This commit is contained in:
@@ -418,7 +418,7 @@ Check if a value is a void `Element` object.
|
||||
|
||||
### Normalize methods
|
||||
|
||||
#### `normalizeNode(entry: NodeEntry, { operation }) => void`
|
||||
#### `normalizeNode(entry: NodeEntry, { operation, fallbackElement }) => void`
|
||||
|
||||
[Normalize](../../concepts/11-normalizing.md) a Node according to the schema.
|
||||
|
||||
|
Reference in New Issue
Block a user