mindoc/static/editor.md/editormd.min.js

1 line
78 KiB
Go
Raw Normal View History

(function(factory){"use strict";if(typeof require==="function"&&typeof exports==="object"&&typeof module==="object"){module.exports=factory}else if(typeof define==="function"){if(define.amd){}else{define(["jquery"],factory)}}else{window.editormd=factory()}})(function(){"use strict";var $=typeof jQuery!=="undefined"?jQuery:Zepto;if(typeof $==="undefined"){return}var editormd=function(id,options){return new editormd.fn.init(id,options)};editormd.title=editormd.$name="Editor.md";editormd.version="1.5.0";editormd.homePage="https://pandao.github.io/editor.md/";editormd.classPrefix="editormd-";editormd.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]};editormd.defaults={debug:false,mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:500,autoLoadModules:true,watch:true,placeholder:"Enjoy Markdown! coding now...",gotoLine:true,codeFold:false,autoHeight:false,autoFocus:true,autoCloseTags:true,searchReplace:true,syncScrolling:true,readOnly:false,tabSize:4,indentUnit:4,lineNumbers:true,lineWrapping:true,autoCloseBrackets:true,showTrailingSpace:true,matchBrackets:true,indentWithTabs:true,styleSelectedText:true,matchWordHighlight:true,styleActiveLine:true,dialogLockScreen:true,dialogShowMask:true,dialogDraggable:true,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:false,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:false,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:false,uploadCallbackURL:"",toc:true,tocm:false,tocTitle:"",tocDropdown:false,tocContainer:"",tocStartLevel:1,htmlDecode:false,pageBreak:true,atLink:true,emailLink:true,taskList:false,emoji:false,tex:false,flowChart:false,sequenceDiagram:false,mermaid:true,mindMap:true,previewCodeHighlight:true,toolbar:true,toolbarAutoFixed:true,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return editormd.toolbarHandlers.ucwords},lowercase:function(){return editormd.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'<a href="javascript:;" title="Lowercase" unselectable="on"><i class="fa" name="lowercase" style="font-size:24px;margin-top: -10px;">a</i></a>',ucwords:'<a href="javascript:;" title="ucwords" unselectable="on"><i class="fa" name="ucwords" style="font-size:20px;margin-top: -3px;">Aa</i></a>'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",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","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts: