* Fix spell check bug by add data-text:true
* Fix spell check bug by spell check add length to a leaf
* Fix tests to use data-text:true for marks
* Rename data-text to data-slate-leaf; Remove setRef; unlift attributes in leaf
* Update examples with data-*
* Add attributes to document
* Fix renderMark in all documents
* Prettier markdown
* Extract hotkey and environment detection into separate packages
Overriding default behavior in plugins can be hard, because you have
to match all of the keybindings that Slate uses. By exporting hotkeys
as its own package, both core Slate plugins and custom plugins can use
the same key detection logic.
* Rename Hotkeys.* to Hotkeys.is*
* Add failing test
* Don't push extra text node at the end of children
* Fix keys in tests
* Add option `normalize` to <value>
* Write Changelog
* Changelog on correct package
* Fix preserve keys test
* Fix tests (which make more sense now)
* Mark failing test as skipped
* Account for skip option
* Lint and fix changelog version
* Use Unreleased instead of version
* Lint markdown
Sometimes, I have nodes that only make sense temporarily, so it
doesn't make sense to serialize them. Following the pattern in React,
explicitly returning `null` from a serialzation rule should result in
that node (and its children) not making it into the serialized document.
Summary:
We mirrored the fix in PR #1278 (meant for #1277) but for drop event.
This fixed an issue I faced with Slate swallowing drop event, kind of breaking compatibility with react-dnd.
/cc @AlbertHilb
* add test for normalization of nested empty inlines
* fix normalization of nested empty inlines
* add test for normalization of inlines with empty void
* fix normalization of inlines containing empty void
* fix linting errors
* Fix node.isEmpty to work properly with void nodes of zero text length
* Take adavantage of fixed node.isEmpty to simplify normalization of empty inlines
* Fix linting errors
* Perhaps faster normalization: Never visit a descendant twice in normalizaton
* Change getFirstInvalidaDescendantKey to getFirstInvalidaDescendant
* Add from-JSON-big in benchmark
* Better annotation
* Remove un-used test change
* Fix skip this in getFurtherstLonelyAncestor
* export runTest in models/
* Change the path of test getOnlyChildAncestor
* Update index.js
* Update get-furthest-only-child.js
* Fix for linting
* add test for normalization of nested empty inlines
* fix normalization of nested empty inlines
* add test for normalization of inlines with empty void
* fix normalization of inlines containing empty void
* fix linting errors