I’ve just tagged version 0.6.0. This is the one where linear positions land, which means a lot of breaking changes.
Positions in the document are now represented by
Pos objects. This means that every function parameter, return
value, or property that used to be a
Pos is now a number instead.
Be extra wary about functions that return an optional position—0 is
a valid position now, so if your code is just checking
if (pos) ...,
it’ll break when getting a 0.
handleContextMenu methods on
node types, which used to take a path as an array of
numbers, now get a single number pointing at the node’s position in
the document instead.
"selectNodeLeft/Right/Up/Down" commands, which were a hack to make node
selection work, are now no longer exposed as commands.
The key bindings for block types changed again, due to the old ones still clashing with default OS X bindings. They are now prefixed with Shift-Ctrl (rather than Shift-Cmd on OS X).
Nodes lost the
width properties, and now expose
nodeSize property instead, which is the total
size of the node. The
size attribute on
fragments changed meaning to point at the total size of
the fragment’s children (rather than their count).
The node and fragment methods
replaceDeep, and the old
replace are gone.
Document manipulation is now best done in one shot using the new
replace method, which replaces a range of the
document with a
Node.nodeAfter is now called
Node.nodeAt. It does mostly the same
thing, except that it now takes a number position.
Node.nodesBetween passes a start position for the current node,
rather than mutable path, to its callback.
is gone, since it is now very easy to do something like that with
Node.descendants is a new shorthand that iterates
over all descendant nodes.
The constant empty fragment now lives under
The result of applying a step no longer contains a
position map. Those can be derived from a step without
applying it now (using the
posMap method). A
failing step no longer returns
null. Rather, a step result contains
either an error message or an updated document.
Position maps have gotten much simpler, and are created differently now.
Transforms no longer silently ignore failing steps
unless you explicitly tell them to by using the
maybeStep method. The
step method, along with most of the other
transformation methods, will raise an error when they can’t be
An unsoundness in the collaborative editing algorithm’s handling of replace steps has been fixed.
The SVG icons now also work when you have a
<base> tag on your page.
Fix select-all on Firefox.
Fix crash in history compression.
Properly handle HTML sublists not wrapped in an
Prevent Ctrl-Enter and Ctrl-Backspace on OS X from messing up our document.
Handle the case where a
clipboardData object is present but doesn’t
actually work (iOS).
ProseMirror.flush now return a boolean
indicating whether it redrew the display.
New data type,
Slice, which represents a piece of document along
with information about the nodes on both sides that are ‘open’ (can be
joined to adjacent nodes when inserting it into a document).
Node.eq predicate can now be used to determine whether two nodes
type parameter to
defaults to the node’s current type.