Markdown Editor
Client-side markdown editor which compatible with any renderer engine.
Example of usage
var editor = new MarkdownEditor({
container: 'content',
markdownToHtmlConvertor: markdownToHtmlConvertor
});
editor.load();
Demo
Options
container
string or object, an Id of textarea
element or element itself for wrapping in MarkdownEditorShell
.
fullscreenButtonTitle
string, the title of fullscreen button which will be shown by mouse over. Defaults to Enter Fullscreen
.
previewButtonTitle
string, the title of preview button which will be shown by mouse over. Defaults to Toggle Preview Mode
.
markdownToHtmlConvertor
function that represents converter from markdown text (input parameter) to html (output value).
additionalButtons
array of groups of buttons
to display in toolbar.
Each group should represent the following object:
{
name: "",
buttons: [
{
title: "Bold",
className: "glyphicon glyphicon-bold",
action: buttonAction(e)
}
]
}
License
Markdown Editor is under the MIT license.