It’s been two and a half month since 0.22.0, but finally 0.23.0 is here. It comes with quite a long list of changes, some of them breaking, since I’ve been reviewing all the parts that I wasn’t happy with yet and cleaning them up. I also worked on the docs, where I noticed and removed some methods that seemed superfluous.
Unless something really bad is found, I’m going to release this, maybe with some minor fixes, as 1.0.0 in two weeks (end of September). If you’re using ProseMirror, trying to upgrade and reporting anything that goes wrong would be very helpful.
You’ll find a new guide, more examples, and a somewhat more polished reference manual on the website. Those probably contain typos still, since I only read them once after I wrote them, so if you read them, issues or pull requests are appreciated.
prosemirror-model 0.23.0 (2017-09-13)
Attribute and mark constraints in content expressions are no longer supported (this also means the
prosemirror-schema-table package, which relied on them, is no longer supported). In this release, mark constraints are still (approximately) recognized with a warning, when present.
ContentMatch objects lost a number of methods:
findWrappingFor (which can be easily emulated using the remaining API), and
allowsMark, which is now the responsibility of node types instead.
ContentMatch.validEnd is now a property rather than a method.
ContentMatch.findWrapping now returns an array of plain node types, with no attribute information (since this is no longer necessary).
compute method for attributes is no longer supported.
Fragments no longer have an
DOMParser.schemaRules is no longer public (use
fromSchema and get the resulting parser’s
rules property instead).
The DOM parser option
topStart has been replaced by
marksFromSchema are no longer public (construct a serializer with
fromSchema and read its
marks properties instead).
Fix issue where whitespace at node boundaries was sometimes dropped during content parsing.
Attribute default values of
undefined are now allowed.
contentElement in parse rules may now be a function.
The new method
ResolvedPos.marksAcross can be used to find the set of marks that should be preserved after a deletion.
Content expressions are now a regular language, meaning all the operators can be nested and composed as desired, and a bunch of constraints on what could appear next to what have been lifted.
The starting content match for a node type now lives in
Allowed marks are now specified per node, rather than in content expressions, using the
marks property on the node spec.
style property on parse rules may now have the form
"font-style=italic" to only match styles that have the value after the equals sign.
prosemirror-transform 0.23.0 (2017-09-13)
Step.toJSON no longer has a default implementation.
Steps no longer have an
offset method. Map them through a map created with
Pasting a list item at the start of a non-empty textblock now wraps the textblock in a list.
Marks on open nodes at the left of a slice are no longer dropped by
StepMap now has a static method
offset, which can be used to create a map that offsets all positions by a given distance.
Transform objects now have a
clearIncompatible method that can help make sure a node’s content matches another node type.
prosemirror-view 0.23.0 (2017-09-13)
handleContextMenu props are no longer supported. You can achieve their effect with the
Fixes occasional crash when reading the selection in Firefox.
Putting a table cell on the clipboard now properly wraps it in a table.
The view will no longer scroll into view when receiving a state that isn’t derived from its previous state.
Transactions caused by a paste now have their “paste” meta property set to true.
Adds a new view prop,
handleScrollToSelection to override the behavior of scrolling the selection into view.
The new editor prop
clipboardTextSerializer allows you to override the way a piece of document is converted to clipboard text.
Adds the editor prop
clipboardTextParser, which can be used to define your own parsing strategy for clipboard text content.
DecorationSet.find now supports passing a predicate to filter decorations by spec.
prosemirror-inputrules 0.23.0 (2017-09-13)
headingRule, along with the
allInputRules array, are no longer included in this module.
prosemirror-commands 0.23.0 (2017-09-13)
joinBackward no longer fall back to selecting the next node when no other behavior is possible. There are now separate commands
selectNodeBackward that do this, which the base keymap binds as fallback behavior.
baseKeymap no longer binds keys for
prosemirror-schema-list 0.23.0 (2017-09-13)
splitListItem command now splits the parent list item when executed in a (trailing) empty list item in a nested list.