var SimpleMDE=require("./../../simplemde-markdown-editor/dist/simplemde.min.js"),SMDCSS=require("./../../simplemde-markdown-editor/dist/simplemde.min.css"),Markdown={basic:function(e,i,n){var r,t=($.extend({server:null,width:null,height:100,ready:function(){}},i),"bold,italic,strikethrough,heading,code,quote,unordered-list,ordered-list,clean-block,link".split(","));return t.push({name:"image",action:function(){return window.callback.editorUploadImage(function(e){for(var i=[],n=0;n<e.length;n++)i.push("![图片]("+e[n]+")");r.codemirror.replaceSelection(i.join(" "))}),!0},className:"fa fa-image",title:"图片"}),t.push("preview"),r=new SimpleMDE($.extend({element:document.getElementById(e),spellChecker:!1,toolbar:t,status:!1},n)),r.codemirror.on("change",function(){$("#"+e).val(r.value())}),r},simple:function(e,i,n){return Markdown.basic(e,i,n)}};module.exports=Markdown;