Stackedit/js/extensions/markdown-extra.js
2013-05-25 01:34:04 +01:00

22 lines
558 B
JavaScript

define( [ "Markdown.Extra" ], function() {
var markdownExtra = {
extensionId: "markdownExtra",
extensionName: "Markdown Extra",
defaultConfig: {
prettify: true
}
};
markdownExtra.onEditorConfigure = function(editor) {
var converter = editor.getConverter();
var options = {};
if(markdownExtra.config.prettify === true) {
options.highlighter = "prettify";
editor.hooks.chain("onPreviewRefresh", prettyPrint);
}
Markdown.Extra.init(converter, options);
};
return markdownExtra;
});