Simplest Markdown Editor with Pure JavaScript – easyMarkdown

Category: Javascript , Text | October 20, 2015
Author:blb78
Views Total:1,941 views
Official Page:Go to website
Last Update:October 20, 2015
License:MIT

Preview:

Simplest Markdown Editor with Pure JavaScript – easyMarkdown

Description:

easyMarkdown is a standalone JavaScript library for converting a normal textarea into a WYSIWYG markdown editor.

Features:

  • Lightweight and easy to use.
  • Works with most popular frameworks like Bootstrap, Foundation, etc.
  • Custom editor icons.
  • Custom buttons.

Basic usage:

Create a regular textarea element on the web page.

<textarea id="editor"></textarea>

Download the easyMarkdown and include the JavaScript file easyMarkdown.js at the bottom of the web page.

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

Initialize the markdown editor.

easyMarkdown(document.getElementById('editor'));

Available options with default values.

easyMarkdown(document.getElementById('editor'),{
  // width of the markdown editor
  width: '100%',
  // custom button class
  btnClass: '',
  // bootstrap, foundation, etc...
  framework: 'none',
  // blank = en
  locale:'',
  // custom editor icons
  icons: '',
  // you can disable editor buttons here
  disabled: {
    bold: false,
    italic: false,
    header: false,
    image: false,
    link: false,
    ol: false,
    ul: false,
    comment: false,
    code: false,
    preview: false
  }
  
});

 

You Might Be Interested In:


One thought on “Simplest Markdown Editor with Pure JavaScript – easyMarkdown

  1. whatever

    But doesn’t provide a way to render or preview what has been written?

    Reply

Leave a Reply