Type Editor / @type-editor/dom-change-util / parse-change/is-mark-change
parse-change/is-mark-change
Functions
| Function | Description |
|---|---|
Determines whether one fragment could be created from another by adding or removing a single mark type. Used to optimize mark changes. This is an optimization for detecting when a change is just adding or removing formatting (like bold or italic) without changing the actual text content. When detected, the change can be applied as a mark operation instead of a full content replacement, which is more efficient and maintains better edit history. The detection process:
Returns null if:
See MarkChangeInfo for return type structure |