* [fix/html-serializer-docs-add-class-name-example] add example to the HTML serializer docs on how to use element attributes when serializing and deserializing. I spent a lot of time figuring this out myself so hopefully will save others from having to go through the same process!
* [fix/html-serializer-docs-add-class-name-example] Fix linting errors with Prettier
* 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
* Change example to ctrlKey for Windows
metaKey + B is already mapped to a shortcut on Windows, so this example fails (tested on Chrome, Edge)
* Docs: use ctrlKey to allow custom formatting example to work on Windows
* Docs: change metaKey examples from other walkthroughs for consistency
* Docs: change a missed metaKey
The *Applying custom formatting* guide states that Slate outputs an error in the console when a mark is applied without a corresponding renderer but AFAIK, that's not the case in the current version. I'm guessing this is an old behaviour (I'm completely new to this library), hence the doc update.
* Implement first working rollup config for main slate pkg
* Convert slate-base64-serializer to rollup
* Convert slate-dev-logger to rollup
* Convert slate-html-serializer to rollup
* Convert slate-hyperscript to rollup
* Convert slate-plain-serializer to rollup
* Convert slate-prop-types to rollup
* Convert (mostly) slate-react to rollup
* Convert slate-simulator to rollup
* Misc cleanup and configuration tweaks/fixes
* Convert slate-schema-violations to rollup
* Successful rollup build for top-level examples
* Add plugin to replace process.env.NODE_ENV
* Only rebuild modules and dev examples in watch mode
* Enable sourcemaps for development builds
* Force debug to use browser version, remove builtins plugin
* Remove is-image from example
It relies on node `path` and wouldn't work well in-browser anyway
* Use browser version of react-dom/server
* Move stray require to import
* Configure examples to watch child package output
* Fix tests
* Remove unneeded preferBuiltins from resolve config
* Use more precise files array to ensure sourcemaps aren't included
* Use lodash instead of lodash.throttle
It's pulled in anyway since slate-react needs slate, so using the
minipackage actually causes code duplication
* Improve naming/fix UMD builds, update UMD doc
* Add rollup configs to linting, add a missing dep to package.json
* Use longform rollup CLI flags
* Add rollup-plugin-auto-external to reduce external module configuration
* Combine rollup config into a unioned helper
* Centralize to a single rollup configuration
* Update dist structure and package field naming for PR feedback
* Add comments and address PR feedback on rollup config
* i.e. -> e.g.
* Add some spacing to the configuration to improve readability
* Add a bit more spacing
* Remove umd from example Slate unpkg link
* rename state to value in slate core, as deprecation
* rename all references to state to value in slate core
* migrate slate-base64-serializer
* migrate slate-html-serializer
* migrate slate-hyperscript
* migrate slate-plain-serializer
* migrate slate-prop-types
* migrate slate-simulator
* fix change.setState compat
* deprecate references to state in slate-react
* remove all references to state in slate-react
* remove `value` and `schema` from props to all components
* fix default renderPlaceholder
* fix tests
* update examples
* update walkthroughs
* update guides
* update reference
The old onChange function caused a bunch of `Uncaught TypeError: _this.state.state.change is not a function` errors. Adding the object destructure to the arguments fixes this.
* 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
Because `src/serializers/html.js` depends on `ReactDOMServer.renderToStaticMarkup`, which is no longer bundled with ReactDOM, ReactDOMServer is needed to avoid errors when the HTML serializer is used.
* 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.