Hi all. ProseMirror 0.14.0 has just appeared on NPM and github. The main work for this release was on node views, but it also contains a number of bugfixes and small improvements.
The short story on the node view work is that they allow the editor to produce cleaner HTML (no more pm-
attributes and wrapping spans), to update the DOM more efficiently, and provide a hook for user code to more closely control the shape and behavior of a given node’s DOM representation. For the long story, see the docs.
Release notes
prosemirror-model 0.14.0 (2016-11-28)
New features
Parse rules now support skip
(skip outer element, parse content) and getContent
(compute content using custom code) properties.
The DOMSerializer
class now exports a static renderSpec
method that can help render DOM spec arrays.
prosemirror-state 0.14.0 (2016-11-28)
New features
Selection actions now have a time
field and an (optional) origin
field.
prosemirror-view 0.14.0 (2016-11-28)
Breaking changes
Wrapping decorations are now created using the nodeName
property. The wrapper
property is no longer supported.
The onUnmountDOM
prop is no longer supported (use a node view with a destroy
method instead).
The domSerializer
prop is no longer supported. Use node views to configure editor-specific node representations.
New features
Widget decorations can now be given a key
property to prevent unneccesary redraws.
The EditorView
class now has a destroy
method for cleaning up.
The handleClickOn
prop and friends now receive a direct
boolean argument that indicates whether the node was clicked directly.
Widget decorations now support a stopEvent
option that can be used to control which DOM events that pass through them should be ignored by the editor view.
You can now specify custom node views for an editor view, which give you control over the way node of a given type are represented in the DOM.