github ianstormtaylor/slate v0.8.0
0.8.0

latest releases: slate@0.103.0, slate-react@0.102.0, slate@0.102.0...
7 years ago
BREAKING CHANGES
  • The onKeyDown and onBeforeInput handlers signatures have changed! Previously, some Slate handlers had a signature of (e, state, editor) and others had a signature of (e, data, state, editor). Now all handlers will be passed a data object—which contains Slate-specific data related to the event—even if it is empty. This is helpful for future compatibility where we might need to add data to a handler that previously didn't have any, and is nicer for consistency. The onKeyDown handler's new data object contains the key name, code and a series of is* properties to make working with hotkeys easier. The onBeforeInput handler's new data object is empty.
  • The Utils export has been removed. Previously, a Key utility and the findDOMNode utility were exposed under the Utils object. The Key has been removed in favor of the data object passed to onKeyDown. And then findDOMNode utility has been upgraded to a top-level named export, so you'll now need to access it via import { findDOMNode } from 'slate'.
  • Void nodes now permanently have " " as content. Previously, they contained an empty string, but this isn't technically correct, since they have content and shouldn't be considered "empty". Now they will have a single space of content. This shouldn't really affect anyone, unless you happened to be accessing that string for serialization.
  • Empty inline nodes are now impossible. This is to stay consistent with native contenteditable behavior, where although technically the elements can exist, they have odd behavior and can never be selected.

Don't miss a new slate release

NewReleases is sending notifications on new releases.