玛氪宕·梦魔(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
10 years ago
|
/*! Editor.md v1.2.0 | editormd.amd.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-10 */
|
||
|
!function(e){"use strict";if("function"==typeof require&&"object"==typeof exports&&"object"==typeof module)module.exports=e;else if("function"==typeof define)if(define.amd){var t="codemirror/mode/",i="codemirror/addon/",o=["jquery","marked","prettify","katex","raphael","underscore","flowchart","jqueryflowchart","sequenceDiagram","codemirror/lib/codemirror",t+"css/css",t+"sass/sass",t+"shell/shell",t+"sql/sql",t+"clike/clike",t+"php/php",t+"xml/xml",t+"markdown/markdown",t+"javascript/javascript",t+"htmlmixed/htmlmixed",t+"gfm/gfm",t+"http/http",t+"go/go",t+"dart/dart",t+"coffeescript/coffeescript",t+"nginx/nginx",t+"python/python",t+"perl/perl",t+"lua/lua",t+"r/r",t+"ruby/ruby",t+"rst/rst",t+"smartymixed/smartymixed",t+"vb/vb",t+"vbscript/vbscript",t+"velocity/velocity",t+"xquery/xquery",t+"yaml/yaml",t+"erlang/erlang",t+"jade/jade",i+"edit/trailingspace",i+"dialog/dialog",i+"search/searchcursor",i+"search/search",i+"scroll/annotatescrollbar",i+"search/matchesonscrollbar",i+"display/placeholder",i+"edit/closetag",i+"fold/foldcode",i+"fold/foldgutter",i+"fold/indent-fold",i+"fold/brace-fold",i+"fold/xml-fold",i+"fold/markdown-fold",i+"fold/comment-fold",i+"mode/overlay",i+"selection/active-line",i+"edit/closebrackets",i+"display/fullscreen",i+"search/match-highlighter"];define(o,e)}else define(["jquery"],e);else window.editormd=e()}(function(){"function"==typeof define&&define.amd&&(e=arguments[0],marked=arguments[1],prettify=arguments[2],katex=arguments[3],Raphael=arguments[4],_=arguments[5],flowchart=arguments[6],CodeMirror=arguments[9]);var e="undefined"!=typeof jQuery?jQuery:Zepto;if("undefined"!=typeof e){var t=function(e,i){return new t.fn.init(e,i)};t.title=t.$name="Editor.md",t.version="1.2.0",t.homePage="https://pandao.github.io/editor.md/",t.classPrefix="editormd-",t.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","anchor","image","code","preformatted-text","code-block","table","datetime","emoji","htmlEntities","|","watch","preview","fullscreen","clear","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},t.defaults={mode:"gfm",theme:"default",value:"",markdown:"",width:"100%",height:"100%",path:"./lib/",autoLoadModules:!0,watch:!0,placeholder:"now coding markdown...",codeFold:!1,autoCloseTags:!0,searchReplace:!1,readOnly:!1,lineNumbers:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocStartLevel:1,htmlDecode:!1,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,inRequirejs:!1,toolbar:!0,toolbarIcons:function(){return t.toolbarModes.full},toolbarTitles:{},toolbarHandlers:{},toolbarCustomIcons:{},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",h1:t.classPrefix+"bold",h2:t.classPrefix+"bold",h3:t.classPrefix+"bold",h4:t.classPrefix+"bold",h5:t.classPrefix+"bold",h6:t.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","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o",htmlEntities:"fa-copyright",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa
|
||
|
e=e.replace(new RegExp("<s*"+a+"s*([^>]*)>","igm"),"").replace(new RegExp("<s*/"+a+"s*>","igm"),"")}return e},t.markdownToHTML=function(i,o){var r={gfm:!0,toc:!0,tocStartLevel:1,markdown:"",htmlDecode:!1,inRequirejs:!1,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0};t.$marked=marked;var a=e("#"+i),n=a.settings=e.extend(!0,r,o||{}),s=a.find("textarea"),l=""===n.markdown?s.val():n.markdown,c=[],d={toc:n.toc,tocStartLevel:n.tocStartLevel,taskList:n.taskList,emoji:n.emoji,tex:n.tex,flowChart:n.flowChart,sequenceDiagram:n.sequenceDiagram,previewCodeHighlight:n.previewCodeHighlight},h={renderer:t.markedRenderer(c,d),gfm:n.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:n.htmlDecode?!1:!0,smartLists:!0,smartypants:!0};l=t.filterHTMLTags(l,n.htmlDecode);var u=marked(l,h);if(t.isIE8?s.val(l):s.html(l),a.addClass("markdown-body "+this.classPrefix+"html-preview").append(u),n.toc&&(a.tocContainer=this.markdownToCRenderer(c,a,n.tocStartLevel)),n.previewCodeHighlight&&(a.find("pre").addClass("prettyprint linenums"),prettyPrint()),t.isIE8||(n.flowChart&&a.find(".flowchart").flowChart(),n.sequenceDiagram&&a.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),n.tex){var f=function(){a.find("."+t.classNames.tex).each(function(){var i=e(this);t.$katex.render(i.html(),i[0])})};n.inRequirejs?f():this.loadKaTeX(function(){t.$katex=katex,f()})}return a.getMarkdown=function(){return t.isIE8?s.val():s.html()},a},t.themes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],t.loadPlugins={},t.loadFiles={js:[],css:[],plugin:[]},t.loadPlugin=function(e,i,o){i=i||function(){},this.loadScript(e,function(){t.loadFiles.plugin.push(e),i()},o)},t.loadCSS=function(e,i,o){o=o||"head",i=i||function(){};var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.onload=r.onreadystatechange=function(){t.loadFiles.css.push(e),i()},r.href=e+".css","head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.isIE="Microsoft Internet Explorer"==navigator.appName,t.isIE8=t.isIE&&"8."==navigator.appVersion.match(/8./i),t.loadScript=function(e,i,o){o=o||"head",i=i||function(){};var r=null;r=document.createElement("script"),r.id=e.replace(/[\./]+/g,"-"),r.type="text/javascript",r.src=e+".js",t.isIE8?r.onreadystatechange=function(){r.readyState&&("loaded"===r.readyState||"complete"===r.readyState)&&(r.onreadystatechange=null,t.loadFiles.js.push(e),i())}:r.onload=function(){t.loadFiles.js.push(e),i()},"head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.katexURL={css:"http://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.1/katex.min",js:"http://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.1/katex.min"},t.kaTeXLoaded=!1,t.loadKaTeX=function(e){t.loadCSS(t.katexURL.css,function(){t.loadScript(t.katexURL.js,e||function(){})})},t.lockScreen=function(t){e("html,body").css("overflow",t?"hidden":"")},t.createDialog=function(i){var o={name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1};i=e.extend(!0,o,i);var r=this.editor,a=t.classPrefix,n=(new Date).getTime(),s=""===i.name?a+"dialog-"+n:i.name,l=t.mouseOrTouch,c='<div class="'+a+"dialog "+s+'">';""!==i.title&&(c+='<div class="'+a+'dialog-header"'+(i.drag?' style="cursor: move;"':"")+">",c+='<strong class="'+a+'dialog-title">'+i.title+"</strong>",c+="</div>"),i.closed&&(c+='<a href="javascript:;" class="fa fa-close '+a+'dialog-close"></a>'),c+='<div class="'+a+'dialog-container">'+i.content,(i.footer||"string"==typeof i.footer)&&(c+='<div class="'+a+'dialog-footer">'+("boolean"==typeof i.footer?"":i.footer)+"</div>"),c+="</div>",c+='<div class="'+a+"dialog-mask "+a+'dialog
|