prosemirror-transform
Advanced tools
Changelog
0.20.0 (2017-04-03)
Fixes issue where replacing would sometimes unexpectedly split nodes.
Changelog
0.18.0 (2017-02-24)
Transform.setNodeType
now takes an optional argument to set the new node's attributes.
Steps now provide an offset
method, which makes it possible to create a copy the step with its position offset by a given amount.
docChanged
is now a property on the Transform
class, rather than its Transaction
subclass.
Mapping
instances now have invert
and appendMappingInverted
methods to make mapping through them in reverse easier.
Changelog
0.15.0 (2016-12-10)
Fix bug where pasted/inserted content would sometimes get incorrectly closed at the right side.
Changelog
0.13.0 (2016-11-11)
Fix issue where Transform.replace
would, in specific circumstances, unneccessarily drop content.
The new Transform
method replaceRange
, replaceRangeWith
, and deleteRange
provide a way to replace and delete content in a 'do what I mean' way, automatically expanding the replaced region over empty parent nodes and including the parent nodes in the inserted content when appropriate.
Changelog
0.12.1 (2016-11-01)
Fix bug in Transform.setBlockType
when used in a transform that already has steps.
Changelog
0.12.0 (2016-10-21)
Mapped positions now count as deleted when the token to the
side specified by the assoc
parameter is deleted, rather than when
both tokens around them are deleted. (This is usually what you already
wanted anyway.)