NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2451 most downloaded on npm
ProseMirror document transformations
Last release 9 days ago
25 Sep 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
80 releases · first in 2016
Fix a bug that caused StepMap.mapResult to set deletion flags for insertions adjacent to the mapped position.
Fix a bug that caused StepMap.mapResult to set deletion flags for insertions adjacent to the mapped position.
Fix an issue where replace step fitting could create an invalid slice, and then crash or loop forever.
Fix an issue where replace step fitting could create an invalid slice, and then crash or loop forever.
One column per quarter.
Handle deletions that go from the beginning of one textblock to the beginning of another specially, deleting the selected textblocks entirely.
Handle deletions that go from the beginning of one textblock to the beginning of another specially, deleting the selected textblocks entirely.
ReplaceStep.MAP_BIAS can now be adjusted to change the way insertion steps are mapped over other insertions at the same place. The default behavior remains the same for the sake of backwards compatibility.
The new Tranform.changedRange method gives you a document range that includes all changes made by the transform/transaction.
The new Tranform.changedRange method gives you a document range that includes all changes made by the transform/transaction.
Fix a bug in liftTarget that caused it to fail to properly check content constraints when a lift would split a node.
Fix a bug in liftTarget that caused it to fail to properly check content constraints when a lift would split a node.
Fix a bug that caused mapping ReplaceSteps to reset their structure flag.
Fix a bug that caused mapping ReplaceSteps to reset their structure flag.
Align removeNodeMark's behavior to that of removeMark. When passing in a node type, it now removes all occurrences of that type.
Make sure Mapping.appendMap doesn't mutate shared arrays passed to its constructor.
Make sure Mapping.appendMap doesn't mutate shared arrays passed to its constructor.
Allow Transform.join to clear incompatible inline content from the node after the join.
Allow Transform.join to clear incompatible inline content from the node after the join.
Fix an issue where a deleteRange heuristic could produce unexpected deletion shapes.
Fix an issue where a deleteRange heuristic could produce unexpected deletion shapes.
Make Transform.join convert between newlines and line break replacement nodes when necessary.
setBlockType can now take a function that computes attributes for the new nodes, instead of a static attribute object.
setBlockType can now take a function that computes attributes for the new nodes, instead of a static attribute object.
Fix an issue in ReplaceAroundStep.map that broke mapping steps that wrapped content over steps that inserted content at the start of the step.
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.
The new DocAttrStep can be used to set attributes on the document's top node.
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.
Fix a failure in replaceRange to drop wrapper nodes when the same wrapper is already present.
Fix a failure in replaceRange to drop wrapper nodes when the same wrapper is already present.
When using setBlockType to convert a code block to a type of node that doesn't contain code, replace newlines with spaces.
When using setBlockType to convert a code block to a type of node that doesn't contain code, replace newlines with spaces.
Fix a bug in canSplit that made it interpret the typesAfter argument incorrectly on splits of depth greater than 1.
Fix a bug in canSplit that made it interpret the typesAfter argument incorrectly on splits of depth greater than 1.
Include CommonJS type declarations in the package to please new TypeScript resolution settings.
Include CommonJS type declarations in the package to please new TypeScript resolution settings.
Keep content in isolating nodes inside their parent when fitting a replace step.
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.
The new AttrStep (and Transform.setNodeAttribute) can be used to set individual attributes on a node.
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.
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 point
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.
Include TypeScript type declarations.
Include TypeScript type declarations.
Nothing published for this version
Make replacements that span to the end of a textblock more consistent with those ending in the middle of the block.
Make replacements that span to the end of a textblock more consistent with those ending in the middle of the block.
replaceRange will now close multiple defining parent nodes when appropriate.
replaceRange will now close multiple defining parent nodes when appropriate.
Node specs can now use the definingForContent and definingAsContext properties to opt in to specific parts of the existing defining behavior.
Node specs can now use the definingForContent and definingAsContext properties to opt in to specific parts of the existing defining behavior.
Make sure that constructing an empty StepMap returns StepMap.empty.
Make sure that constructing an empty StepMap returns StepMap.empty.
Fix an inconsistency in deleteRange where it would delete the parent node for ranges covering all textblocks in a given parent.
Fix an inconsistency in deleteRange where it would delete the parent node for ranges covering all textblocks in a given parent.
Fix a regression in dropPoint that caused it to dereference undefined in some circumstances.
Fix a regression in dropPoint that caused it to dereference undefined in some circumstances.
Fix a crash in Transform.replaceRange when called with under specific circumstances.
Fix a crash in Transform.replaceRange when called with under specific circumstances.
Fix an issue where dropPoint could return an invalid drop point.
The various properties of subclasses of Step (ReplaceStep, ReplaceAroundStep, AddMarkStep, and RemoveMarkStep) are now part of the public interface.
The various properties of subclasses of Step (ReplaceStep, ReplaceAroundStep, AddMarkStep, and RemoveMarkStep) are now part of the public interface.
Fix a bug where merging replace steps with the structure flag could create steps that couldn't be applied.
Fix a bug where merging replace steps with the structure flag could create steps that couldn't be applied.
Fix an issue in Transform.removeMark where the mark type was passed through to be removed instead of the mark itself.
Fix an issue in Transform.removeMark where the mark type was passed through to be removed instead of the mark itself.
Fix an issue where Transform.removeMark, when given a mark type, would only remove the first instance from nodes that had multiple marks of the type.
Fix an issue where Transform.removeMark, when given a mark type, would only remove the first instance from nodes that had multiple marks of the type.
Fix an issue where AddMarkStep would mark inline nodes with content.
Fix an issue where AddMarkStep would mark inline nodes with content.
Fix an issue where fitting a slice at the top level of the document would, in some circumstances, crash.
Fix an issue where fitting a slice at the top level of the document would, in some circumstances, crash.
Fix an issue where in some cases replace fitting would insert an additional bogus node when fitting content into nodes with strict content restriction
Fix an issue where in some cases replace fitting would insert an additional bogus node when fitting content into nodes with strict content restrictions.
Fix an issue where creating a replace step would sometimes fail due to unmatchable close tokens after the replaced range.
Fix an issue where creating a replace step would sometimes fail due to unmatchable close tokens after the replaced range.
Rewrite the slice-fitting code used by replaceStep to handle a few more corner cases.
Rewrite the slice-fitting code used by replaceStep to handle a few more corner cases.
Nothing published for this version
Nothing published for this version
Fix joinPoint to return check whether the parent node allows a given join.
Fix joinPoint to return check whether the parent node allows a given join.
Fix a crash in deleteRange that occurred when deleting a region that spans to the ends of two nodes at different depths.
Fix a crash in deleteRange that occurred when deleting a region that spans to the ends of two nodes at different depths.
Rename ES module files to use a .js extension, since Webpack gets confused by .mjs
Rename ES module files to use a .js extension, since Webpack gets confused by .mjs
The file referred to in the package's module field now is compiled down to ES5.
The file referred to in the package's module field now is compiled down to ES5.
Add a module field to package json file.
Add a module field to package json file.
Fixes an issue where deleting a range from the start of block A to the end of block B would leave you with an empty block of type B.
Fixes an issue where deleting a range from the start of block A to the end of block B would leave you with an empty block of type B.
Fix crash in building replace steps for open-ended slices with complicated node content expressions.
Fix crash in building replace steps for open-ended slices with complicated node content expressions.
`Mapping.invert` is now part of the documented API (it was intented to be public from the start, but a typo prevented it from showing up in the docs).
Mapping.invert is now part of the documented API (it was intented to be public from the start, but a typo prevented it from showing up in the docs).
Fix an issue where a replace could needlessly drop content when the first node of the slice didn't fit the target context.
replaceRange now more aggressively expands the replaced region if replace fails to place the slice.
Replacing from a code block into a paragraph that has marks, or similar scenarios that would join content with the wrong marks into a node, no longer
Replacing from a code block into a paragraph that has marks, or similar scenarios that would join content with the wrong marks into a node, no longer crashes.
Fix issue where `replaceRange` might create invalid nodes.
Fix issue where replaceRange might create invalid nodes.
Fix issues in the new `dropPoint` function.
Fix issues in the new dropPoint function.
`Transform.getMirror`, usable in obscure circumstances for inspecting the mirroring structure or a transform, is now a public method.
Transform.getMirror, usable in obscure circumstances for inspecting the mirroring structure or a transform, is now a public method.
New utility function dropPoint, which tries to find a valid position for dropping a slice near a given document position.
`Transform.setBlockType` no longer drops marks on the nodes it updates.
Transform.setBlockType no longer drops marks on the nodes it updates.
Fix a bug that made `replaceStep` unable to generate wrapper nodes in some circumstances.
Fix a bug that made replaceStep unable to generate wrapper nodes in some circumstances.
Fixes an issue where `replaceStep` could generate slices that internally violated the schema.
Fixes an issue where replaceStep could generate slices that internally violated the schema.
`Transform.deleteRange` will cover unmatched opening at the start of the deleted range.
Transform.deleteRange will cover unmatched opening at the start of the deleted range.
Throw errors, rather than constructing invalid objects, when deserializing from invalid JSON data.
Throw errors, rather than constructing invalid objects, when deserializing from invalid JSON data.
`replaceStep` will now return null rather than an empty step when it fails to place the slice.
replaceStep will now return null rather than an empty step when it fails to place the slice.
Avoid duplicating defining parent nodes in replaceRange.
Fix overeager closing of destination nodes when fitting a slice during replacing.
Fix overeager closing of destination nodes when fitting a slice during replacing.
Fix a problem where slice-placing didn't handle content matches correctly and might generate invalid steps or fail to generate steps though a valid on
Fix a problem where slice-placing didn't handle content matches correctly and might generate invalid steps or fail to generate steps though a valid one exists.
Allows adjacent nodes from an inserted slice to be placed in different parent nodes, allowing Transform.replace to create fits that weren't previously found.
### Bug fixes Fixes a crash in `replace`.
Fixes a crash in replace.
Your coding agent can read these notes before it upgrades. Set up the MCP server →