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
* Set up webpack configuration for building examples
* Configure react-hot-loader in development
* Improve config, set gh-pages to use examples/dist directory
* PR feedback
* Rename App.js in git
* Remove memoization from node.getKeys
* Remove memoization from methods that are directly backed by AsArray variants
* Remove memoization from hasChild/Descendant/Node
These are thin wrappers on top of functions that are themselves
memoized.
When drag and dropping a node to a position earlier in the document,
the node is inserted and then removed right after.
Regenerate the key to make sure the old node is removed instead of the
new one.
* Fix triple selection extending to next block
* Remove unused startOffset
* Add Iscollapsed check to prevent failing setBlock on initial block position
* Fix across-blocks.js test
* Test new hanging selection behaviour
* Lint
* Revert e902fa1acbbcec94a82474b5fea86923c8f2c5ad
* Lint
* Use ternary operator instead of if/else
* add ability to click multiple emojis
currently, after clicking one emoji, user needs to click in the editor before being able to add another emoji
this fixes that by jumping to next text block and focusing selection to make it obvious where next insertion will take place.
* lint code