ProseMirror to HTML (JS)
(This package is based on prosemirror-to-html, which was originally written for PHP.)
Takes ProseMirror JSON and outputs HTML.
Installation
npm install prosemirror-to-html-js --save
Usage
const Renderer = Renderer; const renderer = ; console; // `<p>Example Text</p>`
Supported Nodes
- Blockquote
- BulletList
- CodeBlock
- Heading
- ListItem
- OrderedList
- Paragraph
Supported Marks
- Bold
- Code
- Italic
- Link
Custom Nodes
Define your node as a class -
const Node = Node; { return thisnodetype === "custom_node"; } { return "cnode"; }
Feed it to renderer
instance -
renderer;