prosemirror-transform
Advanced tools
Changelog
1.10.0 (2024-08-13)
setBlockType
can now take a function that computes attributes for the new nodes, instead of a static attribute object.
Changelog
1.9.0 (2024-05-06)
Fix an issue in ReplaceAroundStep.map
that broke mapping steps that wrapped content over steps that inserted content at the start of the step.
setBlockMarkup
now uses the linebreak equivalent node defined in the schema.
Changelog
1.8.0 (2023-10-01)
The new DocAttrStep
can be used to set attributes on the document's top node.
Transform.setDocAttribute
can be used to create a DocAttrStep
in a transform.
Changelog
1.7.5 (2023-08-22)
Fix a failure in replaceRange
to drop wrapper nodes when the same wrapper is already present.
Changelog
1.7.4 (2023-07-28)
When using setBlockType
to convert a code block to a type of node that doesn't contain code, replace newlines with spaces.
Changelog
1.7.3 (2023-06-01)
Fix a bug in canSplit
that made it interpret the typesAfter
argument incorrectly on splits of depth greater than 1.
Changelog
1.7.2 (2023-05-17)
Include CommonJS type declarations in the package to please new TypeScript resolution settings.
Changelog
1.7.1 (2023-01-20)
Keep content in isolating nodes inside their parent when fitting a replace step.
Transform.setNodeMarkup
will no longer clear the node's marks when it isn't given an array of marks.
Changelog
1.7.0 (2022-08-16)
The new AttrStep
(and Transform.setNodeAttribute
) can be used to set individual attributes on a node.
AddNodeMarkStep
and RemoveNodeMarkStep
can now be used to add and remove marks on individual nodes. Transform.addNodeMark
/removeNodeMark
provide an interface to these in transform objects.
Changelog
1.6.0 (2022-06-01)
Allow replace steps to be mapped through changes that delete content next to their start and end points, as long as no delete spans across those points.
MapResult
objects now provide information about whether the tokens before, after, and around the position were deleted.