use mdast instead of html for rte local model

markdown is currently serialized to html at load time,
which makes it near impossible to support arbitrary html
in the markdown. This also means we're stringifying to
html on every change.

This commit moves to Remark's MDAST for local serialization,
including parsing from MDAST to Slates's Raw AST. It brings
much more control over the editing experience and full
support for processing unescaped HTML.
This commit is contained in:
Shawn Erquhart
2017-07-18 19:14:40 -04:00
parent 93687d9157
commit 842c2935e9
12 changed files with 465 additions and 150 deletions

View File

@ -116,6 +116,7 @@
"lodash": "^4.13.1",
"markup-it": "^2.0.0",
"material-design-icons": "^3.0.1",
"mdast-util-definitions": "^1.2.2",
"moment": "^2.11.2",
"netlify-auth-js": "^0.5.5",
"normalize.css": "^4.2.0",
@ -165,9 +166,12 @@
"slate": "^0.20.6",
"slate-drop-or-paste-images": "^0.2.0",
"slate-edit-list": "^0.7.1",
"slate-edit-table": "^0.10.1",
"slug": "^0.9.1",
"textarea-caret-position": "^0.1.1",
"unified": "^6.1.4",
"unist-builder": "^1.0.2",
"unist-util-modify-children": "^1.1.1",
"uuid": "^2.0.3",
"whatwg-fetch": "^1.0.0"
},