Lightweight Markdown Parser & Editor In JavaScript – WriteDown

Category: Javascript , Text | June 5, 2015
Views Total:625 views
Official Page:Go to website
Last Update:June 5, 2015


Lightweight Markdown Parser & Editor In JavaScript – WriteDown


WriteDown is a lightweight JavaScript markdown parser used to create a markdown editor with live preview on your website.

How to use it:

Load the markdown parser in the webpage.

<script src="parser.js"></script>

Create a textarea for the markdown editor.

<section id="markdowneditor">
  <span class="label">Markdown</span>
  <textarea id="writearea" spellcheck="false"></textarea>

Create a live preview area.

<section id="livepreview">
  <span class="label">Live preview</span>
  <div id="renderview"></div>

Load the style.css for basic styles.

<link href="style.css" rel="stylesheet">

Enable the markdown editor.

document.querySelector("#writearea").oninput = function () {;
var editor = document.querySelector("#writearea");
editor.value += "#Hello World-programmet";

You Might Be Interested In:

Leave a Reply