1.0.0-beta.2 • Published 4 years ago

@kazssym/mdtodom v1.0.0-beta.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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.