Helper functions for adding and removing marks via Transform steps.
Ports addMark, removeMark, and clearIncompatible from
prosemirror-transform/src/mark.ts.
Summary
Functions
Add the given mark to inline content between from and to.
Removes all marks and nodes from the content of the node at pos that
don't match the given new parent node type. Optionally accepts a starting
content match and a flag for clearing newlines.
Remove marks from inline nodes between from and to.
Functions
Add the given mark to inline content between from and to.
Walks the document, collecting RemoveMarkStep entries for any marks that the new mark excludes, and AddMarkStep entries for ranges that need the mark. Adjacent ranges are coalesced into a single step.
Removes all marks and nodes from the content of the node at pos that
don't match the given new parent node type. Optionally accepts a starting
content match and a flag for clearing newlines.
Remove marks from inline nodes between from and to.
When mark is a Mark, remove precisely that mark. When it is a MarkType,
remove all marks of that type. When it is nil, remove all marks.