File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' slate ' : minor
3+ ---
4+
5+ Added ` force ` property to ` normalizeNode ` passed from ` normalize ` method
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export const normalize: EditorInterface['normalize'] = (
5757 by definition adding children to an empty node can't cause other paths to change.
5858 */
5959 if ( Node . isElement ( node ) && node . children . length === 0 ) {
60- editor . normalizeNode ( entry , { operation } )
60+ editor . normalizeNode ( entry , { operation, force } )
6161 }
6262 }
6363 }
@@ -83,7 +83,7 @@ export const normalize: EditorInterface['normalize'] = (
8383 // If the node doesn't exist in the tree, it does not need to be normalized.
8484 if ( Node . has ( editor , dirtyPath ) ) {
8585 const entry = Editor . node ( editor , dirtyPath )
86- editor . normalizeNode ( entry , { operation } )
86+ editor . normalizeNode ( entry , { operation, force } )
8787 }
8888 iteration ++
8989 dirtyPaths = getDirtyPaths ( editor )
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ export interface BaseEditor {
5959 options ?: {
6060 operation ?: Operation
6161 fallbackElement ?: ( ) => Element
62+ force ?: boolean
6263 }
6364 ) => void
6465 onChange : ( options ?: { operation ?: Operation } ) => void
You can’t perform that action at this time.
0 commit comments