玛氪宕·梦魔(Markdown Memo),使用Markdown的云端备忘录,百度IFE的RIA启航班的不合格的作业,才……才没有什么阴谋呢!
源gitee链接https://gitee.com/arathi/MarkdownMemo?_from=gitee_search
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
40 KiB
3 lines
40 KiB
/*! Editor.md v1.1.9 | editormd.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-04 */
|
|
!function(e){"use strict";"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define?define(["jquery"],e):window.editormd=e()}(function(){"use strict";var $="undefined"!=typeof jQuery?jQuery:Zepto;if("undefined"!=typeof $){var editormd=function(e,t){return new editormd.fn.init(e,t)};editormd.title=editormd.$name="Editor.md",editormd.version="1.1.9",editormd.homePage="https://pandao.github.io/editor.md/",editormd.classPrefix="editormd-",editormd.defaults={mode:"gfm",markdown:"",width:"100%",height:"100%",path:"./lib/",watch:!0,placeholder:"now coding markdown...",readOnly:!1,lineNumbers:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,onload:function(){},onchange:function(){},onfullscreen:function(){},onfullscreenExit:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",saveHTMLToTextarea:!1,toc:!0,tocStartLevel:1,fontSize:"13px",htmlDecode:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,inRequirejs:!1,toolbar:!0,toolbarIcons:function(){return["undo","redo","|","bold","del","italic","quote","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","anchor","image","code","code-block-tab","code-block","datetime","|","watch","preview","fullscreen","clear","|","info"]},toolbarTitles:{},toolbarHandlers:{},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",h1:editormd.classPrefix+"bold",h2:editormd.classPrefix+"bold",h3:editormd.classPrefix+"bold",h4:editormd.classPrefix+"bold",h5:editormd.classPrefix+"bold",h6:editormd.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link",anchor:"fa-anchor",image:"fa-picture-o",code:"fa-code","code-block-tab":"fa-file-code-o","code-block":"fa-file-code-o",datetime:"fa-clock-o",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器<br/>A simple markdown doucment online editor.",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接",anchor:"锚点",image:"图片",code:"行内代码","code-block-tab":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",datetime:"日期时间",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(可按ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",info:"关于"+editormd.title},buttons:{enter:"确定",cancel:"取消"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。",titleEmpty:"错误:请填写链接标题。"},anchor:{title:"添加锚点链接",name:"锚点名称",url:"链接地址",urlTitle:"链接标题",nameEmpty:"错误:锚点名称不能为空。",titleEmpty:"错误:请填写锚点链接标题。",urlEmpty:"错误:请填写锚点链接地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},tabCodeBlock:{title:"添加预格式文本或代码块",codeEmptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"}}}},editormd.classNames={tex:editormd.classPrefix+"tex"},editormd.dialogZindex=99999,editormd.$katex=null,editormd.$marked=null,editormd.$CodeMirror=null,editormd.$prettyPrint=null,editormd.prototype=editormd.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(e,t){t=t||{};var i=this,o=this.classPrefix=editormd.classPrefix,a=this.editor=$("#"+e),r=this.settings=$.extend(!0,editormd.defaults,t);this.id=e,this.lang=r.lang;var n=this.classNames={textarea:{html:this.classPrefix+"html-textarea",markdown:this.classPrefix+"markdown-textarea"}};this.state.watching=r.watch?!0:!1,a.hasClass("editormd")||a.addClass("editormd"),a.css({width:"number"==typeof r.width?r.width+"px":r.width,height:"number"==typeof r.height?r.height+"px":r.height});var s=this.markdownTextarea=a.children("textarea");s.length<1&&(a.append("<textarea></textarea>"),s=this.markdownTextarea=a.children("textarea")),s.addClass(n.textarea.markdown).attr("name",e+"-markdown-doc").attr("placeholder",r.placeholder);var l=[r.readOnly?"":'<a href="javascript:;" class="fa fa-close '+o+'preview-close-btn"></a>',r.saveHTMLToTextarea?'<textarea class="'+n.textarea.html+'" name="'+e+'-html-code"></textarea>':"",'<div class="'+o+'preview"><div class="markdown-body '+o+'preview-container"></div></div>','<div class="'+o+'container-mask" style="display:block;"></div>','<div class="'+o+'mask"></div>'].join("\n");return a.append(l).addClass(o+"vertical"),""!==r.markdown&&s.val(r.markdown),this.htmlTextarea=a.find("."+n.textarea.html),this.preview=a.find("."+o+"preview"),this.previewContainer=this.preview.children("."+o+"preview-container"),this.toolbarIconHandlers={},r.inRequirejs?(i.setCodeMirror(),i.setToolbar(),i.setMarked().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){var e=this,t=this.settings,i=t.path,o=function(){return editormd.isIE8?void e.setMarked().loadedDisplay():void(t.flowChart||t.sequenceDiagram?editormd.loadScript(i+"raphael.min",function(){editormd.loadScript(i+"underscore.min",function(){!t.flowChart&&t.sequenceDiagram?editormd.loadScript(i+"sequence-diagram.min",function(){e.setMarked().loadedDisplay()}):t.flowChart&&!t.sequenceDiagram?editormd.loadScript(i+"flowchart.min",function(){editormd.loadScript(i+"jquery.flowchart.min",function(){e.setMarked().loadedDisplay()})}):t.flowChart&&t.sequenceDiagram&&editormd.loadScript(i+"flowchart.min",function(){editormd.loadScript(i+"jquery.flowchart.min",function(){editormd.loadScript(i+"sequence-diagram.min",function(){e.setMarked().loadedDisplay()})})})})}):e.setMarked().loadedDisplay())};return editormd.loadCSS(i+"codemirror/codemirror.min"),editormd.loadScript(i+"codemirror/codemirror.min",function(){editormd.$CodeMirror=CodeMirror,editormd.loadScript(i+"codemirror/modes.min",function(){editormd.loadScript(i+"codemirror/addons.min",function(){e.setCodeMirror(),e.setToolbar(),editormd.loadScript(i+"marked.min",function(){editormd.$marked=marked,t.previewCodeHighlight?editormd.loadScript(i+"prettify.min",function(){o()}):o()})})})}),this},setCodeMirror:function(){var e=this.settings,t=this.editor,i={mode:e.mode,theme:"default",tabSize:4,dragDrop:!1,autofocus:!0,readOnly:e.readOnly?"nocursor":!1,indentUnit:4,lineNumbers:e.lineNumbers,lineWrapping:!0,matchBrackets:!0,indentWithTabs:!0,styleActiveLine:e.styleActiveLine,styleSelectedText:!0,autoCloseBrackets:!0,showTrailingSpace:!0,highlightSelectionMatches:e.matchWordHighlight?{showToken:"onselected"==e.matchWordHighlight?!1:/\w/}:!1};return this.codeEditor=editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0],i),this.codeMirror=t.find(".CodeMirror"),this.codeMirror.css({fontSize:e.fontSize,width:e.watch?"50%":"100%"}),this},showToolbar:function(){var e=this.settings;if(!e.readOnly)return e.toolbar=!0,this.toolbar.show(),this.resize(),this},hideToolbar:function(){var e=this.settings;return e.toolbar=!1,this.toolbar.hide(),this.resize(),this},setToolbar:function(){var e=this.settings;if(!e.readOnly){var t=this.editor,i=(this.preview,this.classPrefix);t.append('<div class="'+i+'toolbar"><div class="'+i+'toolbar-container"><ul class="'+i+'menu"></ul></div></div>');var o=this.toolbar=t.find("."+i+"toolbar");if(!e.toolbar)return void o.hide();o.show();for(var a=e.toolbarIcons(),r=o.find("."+this.classPrefix+"menu"),n="",s=0,l=a.length;l>s;s++){var d=a[s];if("|"!==d){var c=/h(\d)/.test(d),h=d;"watch"!==d||e.watch||(h="unwatch");var u=e.lang.toolbar[h],g=e.toolbarIconTexts[h],m=e.toolbarIconsClass[h];u="undefined"==typeof u?"":u,g="undefined"==typeof g?"":g,m="undefined"==typeof m?"":m,n+='<li><a href="javascript:;" title="'+u+'" unselectable="on"><i class="fa '+m+'" name="'+d+'" unselectable="on">'+(c?d:""===m?g:"")+"</i></a></li>"}else n+='<li class="divider" unselectable="on">|</li>'}return r.html(n),this.setToolbarHandler(),this}},getToolbarHandles:function(name){var _this=this,settings=this.settings,lang=settings.lang,editor=this.editor,classPrefix=this.classPrefix,dialogLockScreen=function(){settings.dialogLockScreen&&$("html,body").css("overflow","hidden")},dialogShowMask=function(e){e.css({top:($(window).height()-e.height())/2+"px",left:($(window).width()-e.width())/2+"px"}),settings.dialogShowMask&&editor.find("."+classPrefix+"mask").css("z-index",parseInt(e.css("z-index"))-1).show()},toolbarHandlers=this.toolbarHandlers={undo:function(e){e.undo()},redo:function(e){e.redo()},bold:function(e){var t=e.getCursor(),i=e.getSelection();e.replaceSelection("**"+i+"**"),""===i&&e.setCursor(t.line,t.ch+2)},del:function(e){var t=e.getCursor(),i=e.getSelection();e.replaceSelection("~~"+i+"~~"),""===i&&e.setCursor(t.line,t.ch+2)},italic:function(e){var t=e.getCursor(),i=e.getSelection();e.replaceSelection("*"+i+"*"),""===i&&e.setCursor(t.line,t.ch+1)},quote:function(e){var t=e.getCursor(),i=e.getSelection();e.replaceSelection("> "+i),e.setCursor(t.line,""===i?t.ch+2:t.ch+i.length+2)},h1:function(e){var t=e.getSelection();e.replaceSelection("# "+t)},h2:function(e){var t=e.getSelection();e.replaceSelection("## "+t)},h3:function(e){var t=e.getSelection();e.replaceSelection("### "+t)},h4:function(e){var t=e.getSelection();e.replaceSelection("#### "+t)},h5:function(e){var t=e.getSelection();e.replaceSelection("##### "+t)},h6:function(e){var t=e.getSelection();e.replaceSelection("###### "+t)},"list-ul":function(e){var t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("- "+t);else{for(var i=t.split("\n"),o=0,a=i.length;a>o;o++)i[o]=""===i[o]?"":"- "+i[o];e.replaceSelection(i.join("\n"))}},"list-ol":function(e){var t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("1. "+t);else{for(var i=t.split("\n"),o=0,a=i.length;a>o;o++)i[o]=""===i[o]?"":o+1+". "+i[o];e.replaceSelection(i.join("\n"))}},hr:function(e){e.getCursor(),e.getSelection();e.replaceSelection("------------")},link:function(e){var t,i=e.getSelection(),o=lang.dialog.link,a=classPrefix+"link-dialog";if(editor.find("."+a).length>0)t=editor.find("."+a),t.find("[data-url]").val("http://"),t.find("[data-title]").val(i),dialogShowMask(t),dialogLockScreen(),t.show();else{var r='<div class="'+classPrefix+'form"><label>'+o.url+'</label><input type="text" value="http://" data-url /><br/><label>'+o.urlTitle+'</label><input type="text" value="'+i+'" data-title /><br/></div>';t=_this.createDialog({title:o.title,width:380,height:210,content:r,mask:settings.dialogShowMask,drag:settings.dialogDraggable,lockScreen:settings.dialogLockScreen,maskStyle:{opacity:settings.dialogMaskOpacity,backgroundColor:settings.dialogMaskBgColor},buttons:{enter:[lang.buttons.enter,function(){var t=this.find("[data-url]").val(),i=this.find("[data-title]").val();return"http://"===t||""===t?(alert(o.urlEmpty),!1):""===i?(alert(o.titleEmpty),!1):(e.replaceSelection("["+i+"]("+t+' "'+i+'")'),this.hide().lockScreen(!1).hideMask(),!1)}],cancel:[lang.buttons.cancel,function(){return this.hide().lockScreen(!1).hideMask(),!1}]}})}},anchor:function(e){var t,i=e.getCursor(),o=e.getSelection(),a=lang.dialog.anchor,r=classPrefix+"anchor-dialog";if(editor.find("."+r).length>0)t=editor.find("."+r),t.find("[data-name]").val(""),t.find("[data-url]").val("http://"),t.find("[data-title]").val(o),dialogShowMask(t),dialogLockScreen(),t.show();else{var n='<div class="'+classPrefix+'form"><label>'+a.name+'</label><input type="text" data-name /><br/><label>'+a.url+'</label><input type="text" value="http://" data-url /><br/><label>'+a.urlTitle+'</label><input type="text" value="'+o+'" data-title /><br/></div>';t=_this.createDialog({name:r,title:a.title,width:380,height:250,content:n,mask:settings.dialogShowMask,drag:settings.dialogDraggable,lockScreen:settings.dialogLockScreen,maskStyle:{opacity:settings.dialogMaskOpacity,backgroundColor:settings.dialogMaskBgColor},buttons:{enter:[lang.buttons.enter,function(){var t=this.find("[data-name]").val(),r=this.find("[data-url]").val(),n=this.find("[data-title]").val();return""===t?(alert(a.nameEmpty),!1):"http://"===r||""===r?(alert(a.urlEmpty),!1):""===n?(alert(a.titleEmpty),!1):(e.replaceSelection("["+n+"]["+t+"]\n["+t+"]: "+r),""===o&&e.setCursor(i.line,i.ch+1),this.hide().lockScreen(!1).hideMask(),!1)}],cancel:[lang.buttons.cancel,function(){return this.hide().lockScreen(!1).hideMask(),!1}]}})}},image:function(cm){var cursor=cm.getCursor(),selection=cm.getSelection(),imageLang=lang.dialog.image,iframeName=classPrefix+"image-iframe",imageDialogName=classPrefix+"image-dialog",imageDialog;if(editor.find("."+imageDialogName).length>0)imageDialog=editor.find("."+imageDialogName),imageDialog.find('[type="text"]').val(""),imageDialog.find('[type="file"]').val(""),imageDialog.find("[data-link]").val("http://"),dialogShowMask(imageDialog),dialogLockScreen(),imageDialog.show();else{var guid=(new Date).getTime(),action=settings.imageUploadURL+"?guid="+guid;settings.crossDomainUpload&&(action+="&callback="+settings.uploadCallbackURL+"&dialog_id=editormd-image-dialog-"+guid);var imageDialogHTML=(settings.imageUpload?'<form action="'+action+'" target="'+iframeName+'" method="post" enctype="multipart/form-data" class="'+classPrefix+'form">':'<div class="'+classPrefix+'form">')+(settings.imageUpload?'<iframe name="'+iframeName+'" id="'+iframeName+'" guid="'+guid+'"></iframe>':"")+"<label>"+imageLang.url+'</label><input type="text" data-url />'+function(){return settings.imageUpload?'<div class="'+classPrefix+'file-input"><input type="file" name="'+classPrefix+'image-file" accept="image/*" /><input type="submit" value="'+imageLang.uploadButton+'" /></div>':""}()+"<br/><label>"+imageLang.alt+'</label><input type="text" data-alt /><br/><label>'+imageLang.link+'</label><input type="text" value="http://" data-link /><br/>'+(settings.imageUpload?"</form>":"</div>");imageDialog=_this.createDialog({title:imageLang.title,width:settings.imageUpload?465:380,height:250,name:imageDialogName,content:imageDialogHTML,mask:settings.dialogShowMask,drag:settings.dialogDraggable,lockScreen:settings.dialogLockScreen,maskStyle:{opacity:settings.dialogMaskOpacity,backgroundColor:settings.dialogMaskBgColor},buttons:{enter:[lang.buttons.enter,function(){var e=this.find("[data-url]").val(),t=this.find("[data-alt]").val(),i=this.find("[data-link]").val();return""===e?(alert(imageLang.imageURLEmpty),!1):(cm.replaceSelection(""===i||"http://"===i?"!["+t+"]("+e+' "'+t+'")':"[!["+t+"]("+e+' "'+t+'")]('+i+' "'+t+'")'),""===t&&cm.setCursor(cursor.line,cursor.ch+2),this.hide().lockScreen(!1).hideMask(),!1)}],cancel:[lang.buttons.cancel,function(){return this.hide().lockScreen(!1).hideMask(),!1}]}}),imageDialog.attr("id",classPrefix+"image-dialog-"+guid)}var fileInput=imageDialog.find('[name="'+classPrefix+'image-file"]');fileInput.bind("change",function(){var fileName=fileInput.val(),isImage=new RegExp("(\\.("+settings.imageFormats.join("|")+"))$");if(""===fileName)alert(imageLang.uploadFileEmpty);else if(isImage.test(fileName)){imageDialog.loading(!0);var submitHandler=function(){var uploadIframe=document.getElementById(iframeName);uploadIframe.onload=function(){imageDialog.loading(!1);var json=uploadIframe.contentWindow.document.body.innerHTML;return json="undefined"!=typeof JSON.parse?JSON.parse(json):eval("("+json+")"),1===json.success?imageDialog.find("[data-url]").val(json.url):alert(json.message),!1}};imageDialog.find('[type="submit"]').bind(editormd.mouseOrTouch("click","touchend"),submitHandler).trigger("click")}else alert(imageLang.formatNotAllowed+settings.imageFormats.join(", "));return!1})},code:function(e){var t=e.getCursor(),i=e.getSelection();e.replaceSelection("`"+i+"`"),""===i&&e.setCursor(t.line,t.ch+1)},"code-block-tab":function(e){var t,i=(e.getCursor(),e.getSelection()),o=classPrefix+"dialog-tab-code-block";if(editor.find("."+o).length>0)t=editor.find("."+o),t.find("textarea").val(i),dialogShowMask(t),dialogLockScreen(),t.show();else{var a='<textarea placeholder="coding now...." style="width: 680px;height: 300px;">'+i+"</textarea>";t=_this.createDialog({name:o,title:lang.dialog.tabCodeBlock.title,width:750,height:470,mask:settings.dialogShowMask,drag:settings.dialogDraggable,content:a,lockScreen:settings.dialogLockScreen,maskStyle:{opacity:settings.dialogMaskOpacity,backgroundColor:settings.dialogMaskBgColor},buttons:{enter:[lang.buttons.enter,function(){var t=this.find("textarea").val();if(""===t)return alert(lang.dialog.tabCodeBlock.codeEmptyAlert),!1;t=t.split("\n");for(var i in t)t[i]=" "+t[i];return e.replaceSelection(t.join("\n")),this.hide().lockScreen(!1).hideMask(),!1}],cancel:[lang.buttons.cancel,function(){return this.hide().lockScreen(!1).hideMask(),!1}]}})}},"code-block":function(e){var t,i=e.getCursor(),o=e.getSelection(),a=classPrefix+"dialog-code-block";if(editor.find("."+a).length>0)t=editor.find("."+a),t.find("option:first").attr("selected","selected"),t.find("textarea").val(o),dialogShowMask(t),dialogLockScreen(),t.show();else{var r='<div class="'+classPrefix+'code-toolbar">'+lang.dialog.codeBlock.selectLabel+'<select><option selected="selected" value="">'+lang.dialog.codeBlock.selectDefaultText+'</option></select></div><textarea placeholder="coding now...." style="width: 680px;height: 360px;">'+o+"</textarea>";t=_this.createDialog({name:a,title:lang.dialog.codeBlock.title,width:752,height:565,mask:settings.dialogShowMask,drag:settings.dialogDraggable,content:r,lockScreen:settings.dialogLockScreen,maskStyle:{opacity:settings.dialogMaskOpacity,backgroundColor:settings.dialogMaskBgColor},buttons:{enter:[lang.buttons.enter,function(){var t=this.find("textarea").val(),o=this.find("select").val();return""===o?(alert(lang.dialog.codeBlock.unselectedLanguageAlert),!1):""===t?(alert(lang.dialog.codeBlock.codeEmptyAlert),!1):(o="other"===o?"":o,e.replaceSelection(["```"+o,t,"```"].join("\n")),""===o&&e.setCursor(i.line,i.ch+3),this.hide().lockScreen(!1).hideMask(),!1)}],cancel:[lang.buttons.cancel,function(){return this.hide().lockScreen(!1).hideMask(),!1}]}});var n=t.find("select");for(var s in editormd.codeLanguages){var l=editormd.codeLanguages[s];n.append('<option value="'+s+'">'+l+"</option>")}n.append('<option value="other">'+lang.dialog.codeBlock.otherLanguage+"</option>")}},datetime:function(e){var t=(e.getSelection(),new Date,settings.lang.name),i=editormd.dateFormat()+" "+editormd.dateFormat("zh-cn"===t||"zh-tw"===t?"cn-week-day":"week-day");e.replaceSelection(i)},watch:function(){_this[_this.settings.watch?"unwatch":"watch"]()},preview:function(){_this.previewing()},fullscreen:function(){_this.fullscreen()},clear:function(){_this.clear()},info:function(){_this.showInfoDialog()}};return name&&"undefined"!=typeof toolbarIconHandlers[name]?toolbarHandlers[name]:toolbarHandlers},setToolbarHandler:function(){var e=this,t=this.settings;if(t.toolbar&&!t.readOnly){var i=(this.editor,this.preview,this.toolbar),o=this.codeEditor,a=(this.codeMirror,this.classPrefix),r=(this.previewContainer,this.toolbarIcons=i.find("."+a+"menu a"));return r.bind(editormd.mouseOrTouch("click","touchend"),function(){var i=$(this).children(".fa"),a=i.attr("name"),r=o.getCursor(),n=o.getSelection(),s=e.getToolbarHandles();return""!==a?(e.activeIcon=i,"undefined"!=typeof s[a]?s[a](o):"undefined"!=typeof t.toolbarHandlers[a]&&$.proxy(t.toolbarHandlers[a],e)(o,i,r,n),"link"!==a&&"anchor"!==a&&"image"!==a&&"code-block"!==a&&"code-block-tab"!==a&&"watch"!==a&&"preview"!==a&&"fullscreen"!==a&&"info"!==a&&o.focus(),!1):void 0}),this}},createDialog:function(e){var t={name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1};e=$.extend(!0,t,e);var i=this.editor,o=this.classPrefix,a=(new Date).getTime(),r=""===e.name?o+"dialog-"+a:e.name,n=editormd.mouseOrTouch,s='<div class="'+o+"dialog "+r+'">';""!==e.title&&(s+='<div class="'+o+'dialog-header"'+(e.drag?' style="cursor: move;"':"")+">",s+='<strong class="'+o+'dialog-title">'+e.title+"</strong>",s+="</div>"),e.closed&&(s+='<a href="javascript:;" class="fa fa-close '+o+'dialog-close"></a>'),s+='<div class="'+o+'dialog-container">'+e.content,(e.footer||"string"==typeof e.footer)&&(s+='<div class="'+o+'dialog-footer">'+("boolean"==typeof e.footer?"":e.footer)+"</div>"),s+="</div>",s+='<div class="'+o+"dialog-mask "+o+'dialog-mask-bg"></div>',s+='<div class="'+o+"dialog-mask "+o+'dialog-mask-con"></div>',s+="</div>",i.append(s);var l=i.find("."+r);l.lockScreen=function(t){return e.lockScreen&&$("html,body").css("overflow",t?"hidden":""),l},l.showMask=function(){return e.mask&&i.find("."+o+"mask").css(e.maskStyle).css("z-index",editormd.dialogZindex-1).show(),l},l.hideMask=function(){return e.mask&&i.find("."+o+"mask").hide(),l},l.loading=function(e){var t=l.find("."+o+"dialog-mask");return t[e?"show":"hide"](),l},l.lockScreen(!0).showMask(),l.show().css({zIndex:editormd.dialogZindex,border:editormd.isIE8?"1px solid #ddd":"",width:"number"==typeof e.width?e.width+"px":e.width,height:"number"==typeof e.height?e.height+"px":e.height});var d=function(){l.css({top:($(window).height()-l.height())/2+"px",left:($(window).width()-l.width())/2+"px"})};if(d(),$(window).resize(d),l.children("."+o+"dialog-close").bind(n("click","touchend"),function(){l.hide().lockScreen(!1).hideMask()}),"object"==typeof e.buttons){var c=l.footer=l.find("."+o+"dialog-footer");for(var h in e.buttons){var u=e.buttons[h],g=o+h+"-btn";c.append('<button class="'+o+"btn "+g+'">'+u[0]+"</button>"),u[1]=$.proxy(u[1],l),c.children("."+g).bind(n("click","touchend"),u[1])}}if(""!==e.title&&e.drag){var m,f,p=l.children("."+o+"dialog-header");e.mask||p.bind(n("click","touchend"),function(){editormd.dialogZindex+=2,l.css("z-index",editormd.dialogZindex)}),p.mousedown(function(e){e=e||window.event,m=e.clientX-parseInt(l[0].style.left),f=e.clientY-parseInt(l[0].style.top),document.onmousemove=k});var v=function(e){e.removeClass(o+"user-unselect").off("selectstart")},w=function(e){e.addClass(o+"user-unselect").on("selectstart",function(){return!1})},k=function(e){e=e||window.event;var t,i,o=parseInt(l[0].style.left),a=parseInt(l[0].style.top);o>=0?o+l.width()<=$(window).width()?t=e.clientX-m:(t=$(window).width()-l.width(),document.onmousemove=null):(t=0,document.onmousemove=null),a>=0?i=e.clientY-f:(i=0,document.onmousemove=null),document.onselectstart=function(){return!1},w($("body")),w(l),l[0].style.left=t+"px",l[0].style.top=i+"px"};document.onmouseup=function(){v($("body")),v(l),document.onselectstart=null,document.onmousemove=null},p.touchDraggable=function(){var e=null,t=function(t){var i=t.originalEvent,o=$(this).parent().position();e={x:i.changedTouches[0].pageX-o.left,y:i.changedTouches[0].pageY-o.top}},i=function(t){t.preventDefault();var i=t.originalEvent;$(this).parent().css({top:i.changedTouches[0].pageY-e.y,left:i.changedTouches[0].pageX-e.x})};this.bind("touchstart",t).bind("touchmove",i)},p.touchDraggable()}return editormd.dialogZindex+=2,l},createInfoDialog:function(){var e=this,t=this.editor,i=this.classPrefix,o=['<div class="'+i+"dialog "+i+'dialog-info" style="">','<div class="'+i+'dialog-container">','<h1><i class="editormd-logo editormd-logo-lg editormd-logo-color"></i> '+editormd.title+"<small>v"+editormd.version+"</small></h1>","<p>"+this.lang.description+"</p>",'<p>Home page: <a href="'+editormd.homePage+'" traget="_blank">'+editormd.homePage+"</a></p>","<p>License: MIT</p>","</div>",'<a href="javascript:;" class="fa fa-close '+i+'dialog-close"></a>',"</div>"].join("\n");t.append(o);var a=this.infoDialog=t.find("."+i+"dialog-info");return a.find("."+i+"dialog-close").bind(editormd.mouseOrTouch("click","touchend"),function(){e.hideInfoDialog()}),a.css("border",editormd.isIE8?"1px solid #ddd":"").show(),this.infoDialogPosition(),this},infoDialogPosition:function(){var e=this.infoDialog,t=function(){e.css({top:($(window).height()-e.height())/2+"px",left:($(window).width()-e.width())/2+"px"})};return t(),$(window).resize(t),this},showInfoDialog:function(){$("html,body").css("overflow-x","hidden");var e=this.editor,t=this.classPrefix,i=this.infoDialog=e.find("."+t+"dialog-info");return i.length<1&&this.createInfoDialog(),i.show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return $("html,body").css("overflow-x",""),this.infoDialog.hide(),this},setMarked:function(){var e=editormd.$marked,t=this.markdownToC=[];return e.setOptions({renderer:editormd.markedRenderer(t),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:this.settings.htmlDecode?!1:!0,smartLists:!0,smartypants:!0}),this},recreateEditor:function(){var e=this.editor,t=this.settings,i=t.toolbarIcons();return"undefined"!=typeof this.infoDialog&&this.infoDialog.remove(),"undefined"!=typeof i.info&&createInfoDialog(),t.readOnly||(e.find(".editormd-dialog").length>0&&e.find(".editormd-dialog").remove(),this.getToolbarHandles(),this.setToolbar()),this.resize(),this},previewCodeHighlight:function(){var e=this.settings,t=this.previewContainer;return e.previewCodeHighlight&&(t.find("pre").addClass("prettyprint linenums"),prettyPrint()),this},katexRender:function(){var e=this.previewContainer;return e.find("."+editormd.classNames.tex).each(function(){var e=$(this);editormd.$katex.render(e.html(),e[0])}),this},flowChartAndSequenceDiagramRender:function(){var e=this.settings,t=this.previewContainer;return editormd.isIE8?void 0:(e.flowChart&&t.find(".flowchart").flowChart(),e.sequenceDiagram&&t.find(".sequence-diagram").sequenceDiagram({theme:"simple"}),this)},loadedDisplay:function(){var e=this,t=this.editor,i=this.preview,o=this.settings,a=this.codeEditor,r=this.codeMirror,n=(this.previewContainer,editormd.mouseOrTouch);t.find("."+this.classPrefix+"container-mask").hide(),this.saveToTextareas(),o.watch&&i.show(),t.data("oldWidth",t.width()).data("oldHeight",t.height()),this.resize(),$(window).resize(function(){e.resize()});var s=function(){r.find(".CodeMirror-scroll").bind(n("scroll","touchmove"),function(){var e=$(this).height(),t=$(this).scrollTop(),o=t/$(this)[0].scrollHeight;i.scrollTop(0===t?0:t+e>=$(this)[0].scrollHeight?i[0].scrollHeight:i[0].scrollHeight*o)})},l=function(){r.find(".CodeMirror-scroll").unbind(n("scroll","touchmove"))},d=function(){i.bind(n("scroll","touchmove"),function(){var e=$(this).height(),t=$(this).scrollTop(),i=t/$(this)[0].scrollHeight,o=r.find(".CodeMirror-scroll");o.scrollTop(0===t?0:t+e>=$(this)[0].scrollHeight?o[0].scrollHeight:o[0].scrollHeight*i)})},c=function(){i.unbind(n("scroll","touchmove"))};return r.bind({mouseover:s,mouseout:l,touchstart:s,touchend:l}),i.bind({mouseover:d,mouseout:c,touchstart:d,touchend:c}),a.on("change",function(){e.saveToTextareas()}),$.proxy(o.onload,this)(),this.state.loaded=!0,this},width:function(e){return this.editor.css("width","number"==typeof e?e+"px":e),this.resize(),this},height:function(e){return this.editor.css("height","number"==typeof e?e+"px":e),this.resize(),this},resize:function(e,t){e=e||null,t=t||null;var i=this.editor,o=this.preview,a=this.toolbar,r=this.settings,n=(this.codeEditor,this.codeMirror);return e&&t&&i.css({width:"number"==typeof e?e+"px":e,height:"number"==typeof t?t+"px":t}),r.toolbar&&!r.readOnly?n.css("margin-top",a.height()+1).height(i.height()-a.height()):n.css("margin-top",0).height(i.height()),n.find(".CodeMirror-gutters").height(n.height()),r.watch?(n.width(i.width()/2),o.width(this.state.preview?i.width():i.width()/2),r.toolbar&&!r.readOnly?o.css("top",a.height()).height(i.height()-a.height()):o.css("top",0).height(i.height())):(n.width(i.width()),o.hide()),this},saveToTextareas:function(){var e=this,t=this.state,i=this.settings,o=this.codeEditor,a=this.previewContainer,r=o.getValue(),n=this.markdownToC=[],s=editormd.$marked(r,{renderer:editormd.markedRenderer(n)});if(this.markdownTextarea[0].innerText=r,o.save(),i.saveHTMLToTextarea&&this.htmlTextarea.html(s),i.watch||!i.watch&&t.preview){a.html(s),this.previewCodeHighlight(),i.toc&&editormd.markdownToCRenderer(n,a,i.tocStartLevel),i.inRequirejs||editormd.kaTeXLoaded?this.katexRender():editormd.loadKaTeX(function(){editormd.$katex=katex,editormd.kaTeXLoaded=!0,e.katexRender()});var l=setTimeout(function(){clearTimeout(l),e.flowChartAndSequenceDiagramRender()},10);t.loaded&&$.proxy(i.onchange,this)()}return this},focus:function(){return this.codeEditor.focus(),this},setCursor:function(e){return this.codeEditor.setCursor(e),this},getCursor:function(){return this.codeEditor.getCursor()},setSelection:function(e,t){return this.codeEditor.setSelection(e,t),this},getSelection:function(){return this.codeEditor.getSelection()},replaceSelection:function(e){return this.codeEditor.replaceSelection(e),this},insertValue:function(e){return this.replaceSelection(e),this},setMarkdown:function(e){this.settings;return this.codeEditor.setValue(e),this},getMarkdown:function(){return this.codeEditor.getValue()},clear:function(){return this.codeEditor.setValue(""),this},getHTML:function(){return this.settings.saveHTMLToTextarea?this.htmlTextarea.html():(alert("Error: settings.saveHTMLToTextarea == false"),!1)},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){return this.settings.watch?this.previewContainer.html():(alert("Error: settings.watch == false"),!1)},watch:function(e){e=e||function(){},this.state.watching=this.settings.watch=!0,this.preview.show();var t=this.settings.toolbarIconsClass.watch,i=this.settings.toolbarIconsClass.unwatch,o=this.toolbar.find(".fa[name=watch]");return o.parent().attr("title",this.settings.lang.toolbar.watch),o.removeClass(i).addClass(t),this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2),this.saveToTextareas().resize(),$.proxy(e,this)(),this},unwatch:function(e){e=e||function(){},this.state.watching=this.settings.watch=!1,this.preview.hide();var t=this.settings.toolbarIconsClass.watch,i=this.settings.toolbarIconsClass.unwatch,o=this.toolbar.find(".fa[name=watch]");return o.parent().attr("title",this.settings.lang.toolbar.unwatch),o.removeClass(t).addClass(i),this.codeMirror.css("border-right","none").width(this.editor.width()),this.resize(),$.proxy(e,this)(),this},show:function(e){e=e||function(){};var t=this;return this.editor.show(function(){$.proxy(e,t)()}),this},hide:function(e){e=e||function(){};var t=this;return this.editor.hide(function(){$.proxy(e,t)()}),this},previewing:function(){var e=this,t=this.editor,i=this.preview,o=this.toolbar,a=this.settings,r=this.codeMirror;a.toolbar&&(o.toggle(),o.find(".fa[name=preview]").toggleClass("active")),r.toggle(),"none"===r.css("display")?(this.state.preview=!0,this.state.fullscreen&&i.css("background","#fff"),t.find("."+this.classPrefix+"preview-close-btn").show().bind(editormd.mouseOrTouch("click","touchend"),function(){e.previewed()}),a.watch||this.saveToTextareas(),i.show().css({position:"static",top:0,width:t.width(),height:t.height()})):this.previewed(),$(window).keyup(function(t){27===t.keyCode&&e.previewed()})},previewed:function(){var e=this.editor,t=this.preview,i=this.toolbar,o=this.settings,a=this.codeMirror,r=e.find("."+this.classPrefix+"preview-close-btn");return this.state.preview=!1,a.show(),o.toolbar&&i.show(),this.settings.watch?t.show():t.hide(),r.hide().bind(editormd.mouseOrTouch("click","touchend")),t.css({background:null,position:"absolute",width:e.width()/2,height:e.height()-i.height(),top:o.toolbar?i.height():0}),this},fullscreen:function(){var e=this,t=this.editor,i=(this.preview,this.toolbar),o=this.classPrefix+"fullscreen";return i.find(".fa[name=fullscreen]").parent().toggleClass("active"),t.hasClass(o)?this.fullscreenExit():(this.state.fullscreen=!0,$("html,body").css("overflow","hidden"),t.css({position:"fixed",top:0,left:0,margin:0,border:"none",width:$(window).width(),height:$(window).height()}).addClass(o),this.resize(),$.proxy(this.settings.onfullscreen,this)()),$(window).keyup(function(t){e.state.preview||27===t.keyCode&&e.fullscreenExit()
|
|
}),this},fullscreenExit:function(){var e=this.editor,t=this.classPrefix+"fullscreen";return this.state.fullscreen=!1,this.toolbar.find(".fa[name=fullscreen]").parent().removeClass("active"),$("html,body").css("overflow",""),e.css({position:"",top:"",left:"",margin:"0 auto",width:e.data("oldWidth"),height:e.data("oldHeight"),border:"1px solid #ddd"}).removeClass(t),this.resize(),$.proxy(this.settings.onfullscreenExit,this)(),this}},editormd.fn.init.prototype=editormd.fn,editormd.trim=function(e){return String.prototype.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};var trim=editormd.trim;return editormd.markedRenderer=function(e){var t=editormd.$marked,i=new t.Renderer;return e=e||[],i.heading=function(t,i){var o=t,a=/\s*\<a\s*href\=\"(.*)\"\s*([^\>]*)\>(.*)\<\/a\>\s*/;if(a.test(t)){var r=[];t=t.split(/\<a\s*([^\>]+)\>([^\>]*)\<\/a\>/);for(var n=0,s=t.length;s>n;n++)r.push(t[n].replace(/\s*href\=\"(.*)\"\s*/g,""));t=r.join(" ")}t=trim(t);var l=t.toLowerCase().replace(/[^\w]+/g,"-"),d={text:t,level:i,slug:l},c=/^[\u4e00-\u9fa5]+$/.test(t),h=c?escape(t).replace(/\%/g,""):t.toLowerCase().replace(/[^\w]+/g,"-");e.push(d);var u="<h"+i+' id="h'+i+"-"+this.options.headerPrefix+h+'">';return u+='<a name="'+t+'" class="anchor"></a>',u+='<span class="header-link octicon octicon-link"></span>',u+=a?o:t,u+="</h"+i+">"},i.paragraph=function(e){var t=/\$\$(.*)\$\$/g.test(e),i=/^\$\$(.*)\$\$$/.test(e),o=i?' class="'+editormd.classNames.tex+'"':"",a=/^\[TOC\]$/.test(e);return e=!i&&t?e.replace(/(\$\$([^\$]*)\$\$)+/g,function(e,t){return'<span class="'+editormd.classNames.tex+'">'+t.replace(/\$/g,"")+"</span>"}):i?e.replace(/\$/g,""):e,a?'<div class="markdown-toc"><ul class="markdown-toc-list">'+e+"</ul></div>":"<p"+o+">"+e+"</p>\n"},i.code=function(e,i){return"seq"===i||"sequence"===i?'<div class="sequence-diagram">'+e+"</div>":"flow"===i?'<div class="flowchart">'+e+"</div>":t.Renderer.prototype.code.apply(this,arguments)},i},editormd.markdownToCRenderer=function(e,t,i){var o="",a=0;i=i||1;for(var r=0,n=e.length;n>r;r++){var s=e[r].text,l=e[r].level;i>l||(o+=l>a?"":a>l?new Array(a-l+2).join("</ul></li>"):"</ul></li>",o+='<li><a class="toc-level-'+l+'" href="#'+s+'" level="'+l+'">'+s+"</a><ul>",a=l)}var d=t.find(".markdown-toc");return d.children(".markdown-toc-list").html("").html(o),d},editormd.markdownToHTML=function(e,t){t=t||{};var i={toc:!0,tocStartLevel:2,markdown:"",htmlDecode:!1,inRequirejs:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0};editormd.$marked=marked;var o=$("#"+e),a=o.settings=$.extend(!0,i,t),r=o.find("textarea"),n=""===a.markdown?r.val():a.markdown,s=[],l={renderer:editormd.markedRenderer(s),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:a.htmlDecode?!1:!0,smartLists:!0,smartypants:!0},d=marked(n,l);if(editormd.isIE8?r.val(n):r.html(n),o.addClass("markdown-body "+this.classPrefix+"html-preview").append(d),a.toc&&(o.tocContainer=this.markdownToCRenderer(s,o,a.tocStartLevel)),a.previewCodeHighlight&&(o.find("pre").addClass("prettyprint linenums"),prettyPrint()),editormd.isIE8||(a.flowChart&&o.find(".flowchart").flowChart(),a.sequenceDiagram&&o.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),a.tex){var c=function(){o.find("."+editormd.classNames.tex).each(function(){var e=$(this);editormd.$katex.render(e.html(),e[0])})};a.inRequirejs?c():this.loadKaTeX(function(){editormd.$katex=katex,c()})}return o.getMarkdown=function(){return editormd.isIE8?r.val():r.html()},o},editormd.codeLanguages={asp:"ASP",actionscript:"ActionScript(3.0)/Flash/Flex",bash:"Bash/Bat",css:"CSS",c:"C",cpp:"C++",csharp:"C#",coffeescript:"CoffeeScript",d:"D",dart:"Dart",delphi:"Delphi/Pascal",erlang:"Erlang",go:"Golang",groovy:"Groovy",html:"HTML",java:"Java",json:"JSON",javascript:"Javascript",lua:"Lua",less:"LESS",markdown:"Markdown","objective-c":"Objective-C",php:"PHP",perl:"Perl",python:"Python",r:"R",rst:"reStructedText",ruby:"Ruby",sql:"SQL",sass:"SASS/SCSS",shell:"Shell",scala:"Scala",swift:"Swift",vb:"VB/VBScript",xml:"XML",yaml:"YAML"},editormd.codeMirrorModules={modes:["css","sass","shell","sql","clike","php","xml","markdown","javascript","htmlmixed","gfm","http","go","dart","coffeescript","nginx","python","perl","lua","r","ruby","rst","smartymixed","vb","vbscript","velocity","xquery","yaml","erlang","jade"],addons:["edit/trailingspace","dialog/dialog","search/searchcursor","search/search","scroll/annotatescrollbar","search/matchesonscrollbar","display/placeholder","edit/closetag","fold/xml-fold","mode/overlay","selection/active-line","edit/closebrackets","display/fullscreen","search/searchcursor","search/match-highlighter"]},editormd.requirejsInit=function(e,t,i,o){editormd.$CodeMirror=e,editormd.$marked=t,editormd.$katex=i,editormd.$prettyPrint=o},editormd.requireModules=function(e){e=e||"";var t=(editormd.defaults,[]);t.push(e+"codemirror/codemirror.min");for(var i=editormd.codeMirrorModules,o=0,a=i.modes.length;a>o;o++){var r=i.modes[o];t.push(e+"codemirror/mode/"+r+"/"+r)}for(var o=0,a=i.addons.length;a>o;o++){var n=i.addons[o];t.push(e+"codemirror/addon/"+n)}return editormd.loadCSS(editormd.katexURL.css),t},editormd.loadCSS=function(e,t,i){i=i||"head",t=t||function(){};var o=document.createElement("link");o.type="text/css",o.rel="stylesheet",o.onload=o.onreadystatechange=function(){t()},o.href=e+".css","head"===i?document.getElementsByTagName("head")[0].appendChild(o):document.body.appendChild(o)},editormd.isIE="Microsoft Internet Explorer"==navigator.appName,editormd.isIE8=editormd.isIE&&"8."==navigator.appVersion.match(/8./i),editormd.loadScript=function(e,t,i){i=i||"head",t=t||function(){};var o=null;o=document.createElement("script"),o.id=e.replace(/[\./]+/g,"-"),o.type="text/javascript",o.src=e+".js",editormd.isIE8?o.onreadystatechange=function(){o.readyState&&("loaded"===o.readyState||"complete"===o.readyState)&&(o.onreadystatechange=null,t())}:o.onload=function(){t()},"head"===i?document.getElementsByTagName("head")[0].appendChild(o):document.body.appendChild(o)},editormd.katexURL={css:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.1/katex.min",js:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.1/katex.min"},editormd.kaTeXLoaded=!1,editormd.loadKaTeX=function(e){editormd.loadCSS(editormd.katexURL.css,function(){editormd.loadScript(editormd.katexURL.js,e||function(){})})},editormd.mouseOrTouch=function(e,t){e=e||"click",t=t||"touchend";var i=e;try{document.createEvent("TouchEvent"),i=t}catch(o){}return i},editormd.dateFormat=function(e){e=e||"";var t=function(e){return 10>e?"0"+e:e},i=new Date,o=i.getFullYear(),a=o.toString().slice(2,4),r=t(i.getMonth()+1),n=t(i.getDate()),s=i.getDay(),l=t(i.getHours()),d=t(i.getMinutes()),c=t(i.getSeconds()),h=t(i.getMilliseconds()),u="",g=a+"-"+r+"-"+n,m=o+"-"+r+"-"+n,f=l+":"+d+":"+c;switch(e){case"UNIX Time":u=i.getTime();break;case"UTC":u=i.toUTCString();break;case"yy":u=a;break;case"year":case"yyyy":u=o;break;case"month":case"mm":u=r;break;case"cn-week-day":case"cn-wd":var p=["日","一","二","三","四","五","六"];u="星期"+p[s];break;case"week-day":case"wd":var v=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];u=v[s];break;case"day":case"dd":u=n;break;case"hour":case"hh":u=l;break;case"min":case"ii":u=d;break;case"second":case"ss":u=c;break;case"ms":u=h;break;case"yy-mm-dd":u=g;break;case"yyyy-mm-dd":u=m;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":u=m+" "+f+" "+h;break;case"full":case"yyyy-mm-dd h:i:s":default:u=m+" "+f}return u},editormd}});
|