# Release 0.12.0

**URL:** <https://discuss.prosemirror.net/t/release-0-12-0/452>\
**Category:** Announce\
**Created:** [October 21, 2016, 12:44pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452 "2016-10-21T12:44:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [October 21, 2016, 12:44pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/1 "2016-10-21T12:44:50Z")

</div>

I just tagged a 0.12.0 release for all the prosemirror-\* modules. The main new thing is decorations (the replacement for `markRange`), but a number of other things happened. The demos on the website are fully functional again with this release, and I intend to stabilize this release’s interface towards a 1.0 release. (I.e. only make more breaking changes when there is a really extra super good reason to do so.)

This would be a good time to start porting 0.10.x code forward, since 0.12.0 covers all the features 0.10.x had. The reference [docs](http://prosemirror.net/ref.html) are complete, the guide docs still aren’t very extensive.

This happened:

# Release Notes

## [prosemirror-model](http://prosemirror.net/version/2016.10.21.html#model) 0.12.0 (2016-10-21)

### Breaking changes

Drops support for some undocumented options to the DOM serializer that were used by the view.

### Bug fixes

When rendering DOM attributes, only ignore null values, not all falsy values.

## [prosemirror-transform](http://prosemirror.net/version/2016.10.21.html#transform) 0.12.0 (2016-10-21)

### Breaking changes

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.)

## [prosemirror-state](http://prosemirror.net/version/2016.10.21.html#state) 0.12.0 (2016-10-21)

### Breaking changes

The interace to [`EditorState.toJSON`](http://prosemirror.net/version/2016.10.21.html#state.EditorState.toJSON) and `EditorState.fromJSON` has changed.

The way plugins declare their [state field](http://prosemirror.net/version/2016.10.21.html#state.Plugin.constructor.options.state) has changed. Only one state field per plugin is supported, and state fields no longer have hard-coded names. `Plugin.getState` is the way to access plugin state now.

Plugin dependencies are no longer supported.

`Plugin.reconfigure` is gone. Plugins are now always created with [`new Plugin`](http://prosemirror.net/version/2016.10.21.html#state.Plugin.constructor).

Plugins no longer have a `config` field.

### Bug fixes

Node selections are now properly dropped when mapped over a change that replaces their nodes.

### New features

[Plugin keys](http://prosemirror.net/version/2016.10.21.html#state.PluginKey) can now be used to find plugins by identity.

[Transform actions](http://prosemirror.net/version/2016.10.21.html#state.TransformAction) now have a `time` field containing the timestamp when the change was made.

## [prosemirror-view](http://prosemirror.net/version/2016.10.21.html#view) 0.12.0 (2016-10-21)

### Breaking changes

The return value of [`EditorView.posAtCoords`](http://prosemirror.net/version/2016.10.21.html#view.EditorView.posAtCoords) changed to contain an `inside` property pointing at the innermost node that the coordinates are inside of. (Note that the docs for this method were wrong in the previous release.)

### Bug fixes

Reduce reliance on shift-state tracking to minimize damage when it gets out of sync.

Fix bug that’d produce bogus document positions for DOM positions inside non-document nodes.

Don’t treat fast ctrl-clicks as double or triple clicks.

### New features

Implement [decorations](http://prosemirror.net/version/2016.10.21.html#view.Decoration), a way to influence the way the document is drawn. Add the `decorations` prop to specify them.

## [prosemirror-keymap](http://prosemirror.net/version/2016.10.21.html#keymap) 0.12.0 (2016-10-21)

### Breaking changes

Key names are now based on [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) instead of [`.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code). This means that, for character-producing keys, you’ll want to use the character typed, not the key name. So `Ctrl-Z` now means uppercase Z, and you’ll usually want `Ctrl-z` instead. Single-quoted key names are no longer supported.

## [prosemirror-history](http://prosemirror.net/version/2016.10.21.html#history) 0.12.0 (2016-10-21)

### Breaking changes

The [`history`](http://prosemirror.net/version/2016.10.21.html#history.history) export is now a function that creates a history plugin, rather than a plugin instance.

### New features

Add a [`newGroupDelay`](http://prosemirror.net/version/2016.10.21.html#history.history%5Econfig.newGroupDelay) plugin option. This brings back the behavior where pausing between edits will automatically cause the history to put subsequent changes in a new undo event.

## [prosemirror-commands](http://prosemirror.net/version/2016.10.21.html#commands) 0.12.0 (2016-10-21)

### Bug fixes

Fix crash when backspacing into nodes with complex content expressions.

## [prosemirror-schema-basic](http://prosemirror.net/version/2016.10.21.html#schema-basic) 0.12.0 (2016-10-21)

### Bug fixes

Don’t treat \<b style=font-weight: normal\> as strong when parsing. (Google Docs puts such ridiculous HTML on the clipboard.)

---

<div class="post-metadata">

**Author:** ![matthieubellon](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/matthieubellon/32/234_2.png) [@matthieubellon](https://discuss.prosemirror.net/u/matthieubellon)\
**Post date:** [October 21, 2016, 1:53pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/2 "2016-10-21T13:53:50Z")

</div>

Decoration. This is a great choice for naming this feat., better than markRange. Thanks for your hard work.

---

<div class="post-metadata">

**Author:** ![wes-r](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/wes-r/32/77_2.png) [@wes-r](https://discuss.prosemirror.net/u/wes-r)\
**Post date:** [October 21, 2016, 3:07pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/3 "2016-10-21T15:07:51Z")

</div>

YAY! Will work on my 0.10 -\> 0.12 soon.

Note: The link for decoractions above didn’t work for me. [http://prosemirror.net/ref.html#view.Decoration](http://prosemirror.net/ref.html#view.Decoration) works while [http://prosemirror.net/version/2016.09.21.html#view.Decoration](http://prosemirror.net/version/2016.09.21.html#view.Decoration) does not

---

<div class="post-metadata">

**Author:** ![kiejo](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/kiejo/32/64_2.png) [@kiejo](https://discuss.prosemirror.net/u/kiejo)\
**Post date:** [October 21, 2016, 3:38pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/4 "2016-10-21T15:38:34Z")

</div>

Awesome! I’ll work on migrating our code base from 0.10 to 0.12 soon 🙂

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [October 21, 2016, 7:57pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/5 "2016-10-21T19:57:36Z")

</div>

> [@wes-r](#):
>
> Note: The link for decoractions above didn’t work for me

Hah. Thanks for letting me know. The `Date.getMonth`-is-zero-based issue bit me again when I generated the release notes. I’ve updated the post, will update the real release notes in a moment.

---

<div class="post-metadata">

**Author:** ![johanneswilm](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/johanneswilm/32/19_2.png) [@johanneswilm](https://discuss.prosemirror.net/u/johanneswilm)\
**Post date:** [October 22, 2016, 4:12pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/6 "2016-10-22T16:12:18Z")

</div>

Same here, will work on porting from 0.10 soon. How stable do you think the json format is? We are discussion whether or not to switch from storing in html, and preferably we won’t switch many more times after the first switch. And how about the json format of the collaboration steps? Have they changed since 0.10?

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [October 22, 2016, 8:19pm UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/7 "2016-10-22T20:19:43Z")

</div>

I don’t think the JSON formats will change again. The format of marks (and thus, documents) was changed since 0.10, but you can do something like this to convert from the old format:

```
function updateJSONDoc(json) {
  if (json.content) json.content.forEach(updateJSONDoc)
  if (json.marks) json.marks = json.marks.map(mark => {
    let value = {type: mark._, attrs: mark}
    delete value.attrs._
    return value
  })
}
```

---

<div class="post-metadata">

**Author:** ![johanneswilm](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/johanneswilm/32/19_2.png) [@johanneswilm](https://discuss.prosemirror.net/u/johanneswilm)\
**Post date:** [October 26, 2016, 7:06am UTC](https://discuss.prosemirror.net/t/release-0-12-0/452/8 "2016-10-26T07:06:37Z")

</div>

OK, good to know things seem to stabilize.

Will there also be a porting guide from 0.10 to 0.12? It seems like a lot has changed, including most of the variable and function names and how they work. I think it would help a lot if either @marijn or someone else who has done the conversion already could write a guide so we don’t all have to relearn everything from zero.

I can try to help, but given that we really have everything major we need in the 0.10 version, it may take me some time to get through the conversion.
