@bicou/prosemirror-render-vue
v0.0.9
Published
Vue plugin to render ProseMirror JSON data
Downloads
155
Readme
@bicou/prosemirror-render-vue
This plugin allows you to render ProseMirror JSON data in your Vue applications. It provides a Vue component that translates ProseMirror nodes and marks to customizable Vue components or HTML elements.
- From ProseMirror JSON :
{
"type": "doc",
"content": [
{
"type": "paragraph",
"attrs": {
"id": "the-line"
},
"content": [
{
"type": "text",
"text": "The line."
}
]
}
]
}
- Through Vue Vnodes :
h("div", [h("p", { id: "the-line" }, "The line.")]);
- To DOM :
<div><p id="the-line">The line.</p></div>