MDEditor is a simple Markdown editor.
- Write text in Markdown and look at it in a preview
- Upload files and photos
- Export text as Markdown or HTML
You need jQuery version 1.11.0 or higher and Font Awesome version 4.1.0 or higher!
If you doesn't use themes, you need bootstrap!
HTML markup:
<textarea id="mdeditor" name="mdeditor"></textarea>
Without options:
$("#mdeditor").mdeditor();
With options:
$("#mdeditor").mdeditor({
output: 'markdown', // choose between markdown and html
language: 'en-US', // language of editor
width: '100%', // width of editor
height: '250px', // height of textarea in the editor
specialBar: true, // includes the second (special) toolbar
formControl: true, // includes form submit, reset and a go back button
codeIcon: true, // includes button for code markup
mailIcon: true, // includes button for a mail hyperlink markup
phoneIcon: true, // includes button for a phone hyperlink markup
headerIcon: true, // includes button for a header markup
helpIcon: true, // includes help button
preview: true, // includes preview button
attachment: true, // includes attachment button
attachmentDir: 'attachment/', // select attachment directory
wordCounter: true, // includes word counter
includeTipsy: true, // includes tipsy, if you haven't already done this
syntaxHighlighting: true, // activate syntax highlighting in code examples (highlight.js)
wordWrap: true, // wordwrap in textarea
theme: false, // choose a theme -> false = no theme
tabs: true, // activate tabs in textarea
lineBreaks: true, // activate line breaks in markdown (insert automatically 2 white spaces)
maxUpload: 2000000, // 2MB
notUpload: [
'php',
'py',
'rb',
'pl'
] // .php, .py, .rb and .pl files aren't allowed for upload
});
Browser | Version |
---|---|
9 or higher | |
Works! Tested in version 35 | |
Works! Tested in version 29 | |
Not tested - Tell us! | |
Not tested - Tell us! |
MDEditor use chjj/marked to transform Markdown into HTML.
core/marked.js
examples/ - Directory with examples
MDEditor wiki - Examples
https://github.com/Teddy95/MDEditor/wiki
The MIT License (MIT) - View LICENSE.md