Another step on the road to 1.0.0. 0.2.0 is now a git tag and is published to NPM. Quite a lot of API churn again, but this time it’s documented!
Breaking changes
-
The
registermethod’s signature changed, requiring an item name as well as a namespace. Most uses of the schema registry now use that name to replace a field that was previously part of the registered value. For example, command specs no longer have anamefield, but use the registry name. (This was needed to make it possible to selectively override or disable registered values in classes that derive from schema items.) -
InputRules no longer have anamefield, and the corresponding constructor parameter was removed.removeInputRulenow takes a rule object rather than a name string. -
Items in the ‘insert’ and node type menus are now added with
register(under"insertMenu"and"textblockMenu") rather then with a direct property. -
The JSON representation of marks changed. This release will still parse the old representation (spitting out a warning). The next release won’t, so if you’re storing JSON data make sure you parse and re-save at least once with 0.2.0 before upgrading further.
-
The function passed to the
UpdateSchedulerconstructor now starts in the DOM write phase (used to be read). -
The
"flushed"event was removed. -
The
selectedDocandselectedTextmethods were removed.
Bug fixes
-
The Markdown parser now throws an error when encountering a token it doesn’t know how to handle.
-
The menubar will no longer hide the top of the content when the controls inside of it line-wrap.
-
Dropped content is now properly selected.
-
Less fragile rules for curly quote autocompletion.
-
The DOM parser now ignore non-displaying tags (like
<script>and<style>). -
Our
package.jsonnow has a"main"field. -
Fix bug where trailing newlines in code blocks would not be visible.
-
Fix several issues with locating positions in the DOM that occurred for node types that wrapped their content in more than a single element (such as the default code blocks).
New features
-
The menu/menu module now exposes an object
paramTypeswhich allows you to add or redefine the types of parameters that can be rendered. -
The ui/update module now exports
scheduleDOMUpdateandunscheduleDOMUpdatefunctions to schedule synchronized DOM updates. -
Schema items now expose a
cleanNamespacemethod to ‘forget’ values registered on superclasses. -
The computation of registered values on schema items can now be delayed to schema-instantiation-time with the
registerComputedmethod. -
Schema items can now register
"configureMarkdown"items to influence the way the parser library is initialized. -
The
"splitBlock"command will now split off a plain paragraph when executed at the start of a different kind of textblock. -
Node types may now define a
handleContextMenumethod to intercept context menu events inside of them. -
The
Headingnode type now supports amaxLevelproperty that subclasses can use to configure the maximum heading level. -
Node types can now declare themselves to be
draggable. -
Node selections can now be dragged.