1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 17:23:07 +01:00

72 Commits

Author SHA1 Message Date
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
Leon Koole
b6541854fa Fix missing isAltKey (#855) 2017-05-30 13:15:11 -07:00
Mike Hearn
4013d0b18a Minor update to Saving to Database doc (#831) 2017-05-23 18:36:13 -07:00
Asaf Katz
06c54bd991 Docs improvements suggestions (#801)
* Fix typo

* Make it clearer that addMark has changed too
2017-05-21 10:36:23 -07:00
Brian Kabiro
cb98408115 Update defining-custom-block-nodes.md (#776) 2017-05-03 16:51:13 -07:00
eden lane
eb03bd8ec4 Changed hotkey for code block in the walkthrough due to lack of support hotkey ⌘-C in Chrome on Mac (#741) 2017-04-21 21:14:04 -07:00
Conor Cussell
6333275aa0 use correct localStorage method for setting content (#684) 2017-03-24 16:19:23 -07:00
Prayag Verma
3d96d2a309 Fix a typo in walkthroughs/saving-to-a-database (#681)
intial → initial
2017-03-23 10:43:34 -07:00
Kyle Kelley
fa4f9dff6c docs: Delete dangling } (#642) 2017-03-02 17:18:16 -08:00
Victor Pontis
16d8496760 Fix typo on installing Slate documentation (#638) 2017-03-01 11:40:17 -08:00
Ian Storm Taylor
77ffcaae66 add preventDefault to all examples 2017-02-16 10:16:19 -08:00
Michael Plotke
da10eaeca9 Prevent an unexpected ampersand (#604) 2017-02-16 10:12:38 -08:00
Ian Storm Taylor
8bb92aea6d fix saving to a database example, closes #455 2016-11-28 11:17:36 -08:00
Ian Storm Taylor
6591f248bb update walkthroughs to remove function creation from render, closes #394 2016-11-17 18:56:09 -08:00
Matthew Kosloski
3c46d0544c fixed a few typos (#293) 2016-09-04 17:31:06 -07:00
Nick Passarella
43d5735cc9 Fixes a small error in a code example in HTML walkthrough. (#280) 2016-08-31 19:35:34 -07:00
npmcdn-to-unpkg-bot
0893418bca Replace npmcdn.com with unpkg.com (#284) 2016-08-31 19:35:22 -07:00
Ian Storm Taylor
9d293f5ede update docs 2016-08-25 22:59:36 -04:00
Ian Storm Taylor
cb0b9b9095 update keydown handler signature (#254)
* update keydown handler signature

* Update applying-custom-formatting.md

* Update defining-custom-block-nodes.md

* Update saving-to-a-database.md

* Update using-plugins.md
2016-08-18 09:40:19 -07:00
Anton Kulakov
597fbdec72 Fixed typo (#252) 2016-08-18 09:14:58 -07:00
Ian Storm Taylor
e3e9afba43 update walkthroughs and history 2016-08-14 18:25:12 -07:00
Ian Storm Taylor
06af3de5e5 start adding docs 2016-08-14 14:38:27 -07:00