* Pasting external HTML does not work with Slate example. (#1129)
*Due to the upgrade of slate, adjust the way of el.attrs.find to el.href.
* Update index.js
* Reshape void component structure.
Get rid of offscreen spacer.
* Polish Embeds example `Video` component.
* Fix oversight.
* Force spacer width to be 0.
* Update tests
* Make sure nodes update when their selection change
(cherry picked from commit 3e8744409ea94554faafa1e72415cdfb54b4bc78)
* Update examples of showing selected blocks nodes
* refactor to extract applyOperation util
* change handlers to receive transform instead of state
* change onChange to receive a transform, update rich-text example
* fix stack iterationg, convert check-list example
* convert code-highlighting, embeds, emojis examples
* change operations to use full paths, not indexes
* switch split and join to be recursive
* fix linter
* fix onChange calls
* make all operations invertable, add src/operations/* logic
* rename "join" to "merge"
* remove .length property of nodes
* fix node.getFragmentAtRange logic
* convert remaining examples, fix existing changes
* fix .apply() calls and tests
* change setSave and setIsNative transforms
* fix insert_text operations to include marks always
* cleanup and fixes
* fix node inheritance
* fix core onCut handler
* skip constructor in node inheritance
* cleanup
* change updateDescendant to updateNode
* add and update docs
* eliminate need for .apply(), change history to mutable
* add missing file
* add deprecation support to Transform objects
* rename "transform" to "change"
* update benchmark
* add deprecation util to logger
* update transform isNative attr
* fix remaining warn use
* simplify history checkpointing logic
* fix tests
* revert history to being immutable
* fix history
* fix normalize
* fix syntax error from merge
* WIP getting raw marks arrays from the current range
* Always handle marksRaw as Array, fixes tests/lint
* Clean up
* Fixes collapsed selection raw marks, simpler _every_ condition, harmonize toolbar buttons in rich-text example
* raw -> perCharacter
* Add tests for toggleMark collapsed selection
* Add .DS_Store to .gitignore
* Added test for toggleMark add in partially marked selection, with and without other marks
* Added docs for state.marksPerCharacter
* replace marksPerCharacter with activeMarks
* Update the other examples
* Clarify getActiveMarksAtRange
* AddMark/RemoveMark to use getActiveMarksByRange
* User activeMarks for toggle§MarkAtRange transform
* Replace cheerio with parse5
* Convert to dependency injection for HTML parser
* Add options.domParser to HTML serializer
* Fallback to native DOMParser if present and no option provided
* Error if no DOM parser is available (option or native)
* Update tests to pass parse5 as config option
* Update test so it passes.
Cheerio interprets `<p><hr /></p>` as one `p` node with a child `hr`
node, but both parse5 and native DOMParser interpret it as 3 nodes: a
blank `p` node, `hr` node, and second blank `p` node. Update test
expectation to match new API.
* Remove cheerio-esque compatibility conversion.
* Use `application/xml` in native DOMParser
Using `text/html` causes it to wrap the fragment in html, body, etc
* Change error message to single line.
Was inserting an undesired newline char
* Add documentation for new `domParser` option to html serializer
Also boyscout missing documentation for `defaultBlockType` option
* Rename `domParser` option to `parseHtml`
Rename the option to make it clearer what it does, since it accepts a
function and not a `DOMParser` analogue object.
* Fix Edge doctype warning
* Remove getData() calls in onDragOver
Access to data within ondragover is prohibited
* Handle Edge errors accessing `dataTransfer.dropEffect`
* Work around Edge not supporting custom data in drag events
If unable to use `setData()` with custom type, then uses JSON obj to store data in 'text/plain'
* Fix more Edge errors
Edge sometimes throws 'NotSupportedError' whena accessing `items` property on `dataTransfer`
* Fix linting errors
* Fix formatting
* Add property isEmpty to State
* Update hovering menu example
* Document isEmpty
* Improve perf of isEmpty with @Soreine 's suggestion
* Fix return of isEmpty
* Update url when testing locally
When attempting to mess around locally I could never get anything to update. Sure enough I was looking in the wrong place and had missed the `/dev.html` on the end of my url.
Here's to hoping no one else struggles with this again.
* Update Readme.md
* Fix getFragmentAtRange to not return early when selection is in void node or collapsed
* Detecting when cut or copy is made in a void node, and not returning early
* Checking if text exists before using it for cut/copy
* Moving inVoidNode check to onCutOrCopy
as per @ianstormtaylor note.
* If/else for dom operations when copying text vs void node
* Adding fragment span to the contents
* more work on copy-pasting void nodes
* feat: Add ES6 polyfill to examples page
* Fixes issue with IE11 simply not displaying anything on load due to missing `Symbol` shim
* Move script to the bottom before build.prod.js file
* update large example
* pass block down to <Text> for performance, closes#700
* add get-ranges benchmark
* optimize getRanges(), closes#699
* add serialization benchmarks
* optimize Raw.deserializeRanges() by computing marks once, closes#701
* change .merge calls to .set for performance
* change updateDescendant() to use getAncestors() for memoization
* change getPath() to use getAncestors() for memoization
* switch getTexts() and friends to use arrays while iterating
* rename split-block benchmark
* update benchmark compare script