Create A Simple Markdown Editor with jQuery Markdown Plugin

Create A Simple Markdown Editor with jQuery Markdown Plugin
File Size: 34.6KB
Views Total: 4124
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

Markdown is a lightweight jQuery plugin for creating a simple markdown editor that allows the user to easily and quickly insert markdown syntax to a textarea.

See also:

How to use it:

1. Create the html for a markdown editor.

<button onClick="$('#demo').mdBold()">Bold</button>
<button onClick="$('#demo').mdItalic()">Italic</button>
<button onClick="$('#demo').mdHeader({number: 1})">H1</button>
<button onClick="$('#demo').mdHeader({number: 2})">H2</button>
<button onClick="$('#demo').mdHeader({number: 3})">H3</button>
<button onClick="$('#demo').mdHeader({number: 4})">H4</button>
<button onClick="$('#demo').mdLink({default_url: prompt('Enter URL please')})">Link</button>
<button onClick="$('#demo').mdImage({default_image_url: prompt('Enter URL Please')})">Image</button>
<button onClick="$('#demo').mdQuote()">Quote</button>
<button onClick="$('#demo').mdCode()">Code</button>
<button onClick="$('#demo').mdNumberedList()">Numbered List</button>
<button onClick="$('#demo').mdBulletList()">Bullet List</button>
<textarea rows="8" cols="90" id="demo"></textarea>

2. Include the jQuery javascript library and jQuery Markdown plugin at the end of your document.

<script src=""></script>
<script type="text/javascript" src="jquery-markdown.js"></script>

3. That's it.

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