Release 0.21.0

Another minor ProseMirror release today. I ran into a few more things to clean up, and some requirements that inspired minor new features. The only major thing standing in the way of 1.0 at this point is improved documentation. I’m working something else for the next month and a half, but after that, the docs will be my focus. In any case, please don’t be afraid of instability going forward, since aside from minor search/replace changes like in this release, I’m not going to do any damage anymore.

Release notes

prosemirror-model 0.21.0 (2017-05-03)

Breaking changes

The openLeft and openRight properties of Slice objects have been renamed to openStart and openEnd to avoid confusion in right-to-left text. The old names will continue to work with a warning until the next release.

New features

Mark serializing functions now get a second parameter that indicates whether the mark’s content is inline or block nodes.

Setting a mark serializer to null in a DOMSerializer can now be used to omit that mark when serializing.

Node specs support a new property isolating, which is used to disable editing actions like backspacing and lifting across such a node’s boundaries.

prosemirror-state 0.21.0 (2017-05-03)

Breaking changes

Selection.atStart, and atEnd no longer take a second textOnly parameter.

New features

Selection.near, atStart, and atEnd will now fall back to returning an AllSelection when unable to find a valid selection. This removes the (undocumented) requirement that documents always contain a valid selection position (though you’ll probably still want to maintain this for practical UI reasons).

prosemirror-view 0.21.0 (2017-05-03)

Breaking changes

The associative option to widget decorations is no longer supported. To make a widget left-associative, set its side option to a negative number. associative will continue to work with a warning until the next release.

New features

Widget decorations now support a side option that controls which side of them the cursor is drawn, where they move when content is inserted at their position, and the order in which they appear relative to other widgets at the same position.

2 Likes

Hey Marijn,

After FB opensourced Draft.js, I’ve decided to give it a look, but its flat data model was massive dealbreaker for me. My project is internet forum software, and option for users to nest posts in quote or spoiler blocks, complete with images, embeds, headers, lists or other block types is hard requirement. Luckily I’ve taken note of PM’s existence by that time, and I’ve been following project’s progress since.

I’m superhappy to see that you feel that PM’s codebase is mature enough that work on documentation is on the horizon. I’ve given PR a go few weeks back to see what would using it to develop editor for my software entain, but I’ve found docs seriously lacking in examples. As result I’ve decided to put it aside for now and hold on with implementation until more important bits within my project are done and I’ll have more time for drilling into PM’s source for answers.

I’m looking forward to giving PM another go in few months :]