@kazssym/mdtodom

1.0.0-beta.2 • Public • Published

This file documents the mdtodom.js script.

Description

The mdtodom.js script renders commonmark.js AST directly into DOM on modern browsers to make a webpage from a Markdown file.

(License)

Usage

import { render } from "./mdtodom.js";

// Assuming commonmark.js has been loaded.
let parser = new commonmark.Parser();
let child = render(document, parser.parse("*something*"));

let container = document.getElementById("container");
container.appendChild(child);

See also

The project home.

Informational references

The Fetch standard by WHATWG.

The Fetch API documentation on MDN.

Package Sidebar

Install

npm i @kazssym/mdtodom

Weekly Downloads

4

Version

1.0.0-beta.2

License

MIT

Unpacked Size

39.4 kB

Total Files

11

Last publish

Collaborators

  • kazssym