mdtodom

Markdown-to-DOM renderer.

mdtodom

DOMRenderer

DOM renderer for commonmark.js ASTs.

new DOMRenderer(document: Document)
Parameters
document (Document) DOM document
Instance Members
document
render(tree)

render

Renders a commonmark.js AST into DOM.

render(document: Document, tree: commonmark.Node): Node
Parameters
document (Document) DOM Document object
tree (commonmark.Node) commonmark.js Node object
Returns
Node: DOM Node object

waitForScript

Wait for a script to load.

waitForScript(propertyName: string, node: Node)
Parameters
propertyName (string) property name to check whether the script has been loaded or not
node (Node) DOM node to listen a "load" event