1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-25 09:43:21 +01:00

56 Commits

Author SHA1 Message Date
Zach Schneider
56fa2c4208 Upgrade react-frame-component. (#962)
Gets rid of warning in dev about directly accessing `React.PropTypes`
2017-08-01 09:06:39 -07:00
Zach Schneider
4bbf7487ea Replace cheerio with parse5 (#934)
* 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.
2017-07-20 09:46:02 -07:00
Ian Storm Taylor
13a99a9b73 refactor examples, upgrade dependencies 2017-05-04 16:48:42 -07:00
Ian Storm Taylor
0fcb953015 fix to restrict window blur/focus handling, closes #773 2017-05-03 18:48:42 -07:00
Ian Storm Taylor
17ea3ed349 fix to depend on prop-types for react 15.5 2017-04-28 13:04:00 -07:00
Ian Storm Taylor
8e37ea760d add yarn.lock file 2017-04-24 13:11:31 -07:00