Simple jQuery Based Markdown Editor with Live Preview

File Size: 17.5 KB
Views Total: 1429
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simple jQuery Based Markdown Editor with Live Preview

Yet another jQuery based simple markdown editor that supports instant preview and fullscreen mode.

Dependencies:

  • jQuery library.
  • jQuery autosize plugin: dynamic textarea resizing
  • marked: A full-featured markdown parser and compiler

How to use it:

1. Include the required JS files at the bottom of your web page so the pages load faster.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="src/jquery.autosize.min.js"></script>
<script src="src/mdeditor.js"></script>
<script src="src/marked.js"></script>

2. Include the jQuery jQuery Markdown Editor plugin's CSS file in your page's head section.

<link rel="stylesheet" href="css/mdeditor.css">

3. Create a textarea for the markdown editor.

<textarea id="editor">
#MarkDownEditor
---
...
</textarea>

4. Initialize the plugin.

$("#editor").MDEditor({
parser: marked,
autosize: true // requires jQuery autosize plugin
})

This awesome jQuery plugin is developed by ShinyChang. For more Advanced Usages, please check the demo page or visit the official website.