Packages

prosemirror-state

1.4.4 · 23 Oct 2025MIT41.4M / weekRepositoryHomepagenpmAtom feed

Your version

0.13.0

11 Nov 2016Where it was published

0.24.0 is the newest release of 0.13.x.

Release note

Breaking changes

EditorTransform.replaceSelection now takes a slice, no longer a node. The new replaceSelectionWith method should be used to replace the selection with a node. Until the next release, calling it the old way will still work and emit a warning.

Bug fixes

The documentation for applyAction now actually reflects the arguments this method is given.

New features

A state field's applyAction method is now passed the previous state as 4th argument, so that it has access to the new doc and selection.

EditorTransform.replaceSelection now accepts a slice (or, as before, as a node), and uses a revised algorithm, relying on the defining node flag.

The TextSelection and NodeSelection classes now have a static create convenience method for creating selections from unresolved positions.

Allow transform actions to be extended during dispatch using extendTransformAction. Introduce sealed flag to indicate when this is not safe.

A new utility function NodeSelection.isSelectable can be used to test whether a node can be the target of a node selection.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.