Snarkdown is a tiny and powerful markdown parser and editor with pure JavaScript, it can transform Markdown into HTML easily.
How to create a markdown editor using Snarkdown?
1.Install snarkdown
$ npm install snarkdown
2.Import snarkdown
import snarkdown from 'snarkdown';
3.Create a html text and use it to creae a snarkdown instance
let md = '_this_ is **easy** to `use`.'; let html = snarkdown(md); console.log(html); // <em>this</em> is <strong>easy</strong> to <code>use</code>.
4.Output the html
console.log(html);