玛氪宕·梦魔(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.

2 lines
29 KiB

10 years ago
/*! Editor.md v1.1.9 | addons.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-04 */
10 years ago
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,o){o==e.Init&&(o=!1),o&&!n?t.removeOverlay("trailingspace"):!o&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,n){var o,r=e.getWrapperElement();return o=r.appendChild(document.createElement("div")),o.className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?o.innerHTML=t:o.appendChild(t),o}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",function(o,r,i){function a(e){if("string"==typeof e)u.value=e;else{if(c)return;c=!0,l.parentNode.removeChild(l),f.focus(),i.onClose&&i.onClose(l)}}i||(i={}),n(this,null);var s,l=t(this,o,i.bottom),c=!1,f=this,u=l.getElementsByTagName("input")[0];return u?(i.value&&(u.value=i.value,u.select()),i.onInput&&e.on(u,"input",function(e){i.onInput(e,u.value,a)}),i.onKeyUp&&e.on(u,"keyup",function(e){i.onKeyUp(e,u.value,a)}),e.on(u,"keydown",function(t){i&&i.onKeyDown&&i.onKeyDown(t,u.value,a)||((27==t.keyCode||i.closeOnEnter!==!1&&13==t.keyCode)&&(u.blur(),e.e_stop(t),a()),13==t.keyCode&&r(u.value,t))}),i.closeOnBlur!==!1&&e.on(u,"blur",a),u.focus()):(s=l.getElementsByTagName("button")[0])&&(e.on(s,"click",function(){a(),f.focus()}),i.closeOnBlur!==!1&&e.on(s,"blur",a),s.focus()),a}),e.defineExtension("openConfirm",function(o,r,i){function a(){c||(c=!0,s.parentNode.removeChild(s),f.focus())}n(this,null);var s=t(this,o,i&&i.bottom),l=s.getElementsByTagName("button"),c=!1,f=this,u=1;l[0].focus();for(var h=0;h<l.length;++h){var d=l[h];!function(t){e.on(d,"click",function(n){e.e_preventDefault(n),a(),t&&t(f)})}(r[h]),e.on(d,"blur",function(){--u,setTimeout(function(){0>=u&&a()},200)}),e.on(d,"focus",function(){++u})}}),e.defineExtension("openNotification",function(o,r){function i(){l||(l=!0,clearTimeout(a),s.parentNode.removeChild(s))}n(this,i);var a,s=t(this,o,r&&r.bottom),l=!1,c=r&&"undefined"!=typeof r.duration?r.duration:5e3;return e.on(s,"click",function(t){e.e_preventDefault(t),i()}),c&&(a=setTimeout(i,c)),i})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,i){if(this.atOccurrence=!1,this.doc=e,null==i&&"string"==typeof t&&(i=!1),r=r?e.clipPos(r):o(0,0),this.pos={from:r,to:r},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,r){if(n){t.lastIndex=0;for(var i,a,s=e.getLine(r.line).slice(0,r.ch),l=0;;){t.lastIndex=l;var c=t.exec(s);if(!c)break;if(i=c,a=i.index,l=i.index+(i[0].length||1),l==s.length)break}var f=i&&i[0].length||0;f||(0==a&&0==s.length?i=void 0:a!=e.getLine(r.line).length&&f++)}else{t.lastIndex=r.ch;var s=e.getLine(r.line),i=t.exec(s),f=i&&i[0].length||0,a=i&&i.index;a+f==s.length||f||(f=1)}return i&&f?{from:o(r.line,a),to:o(r.line,a+f),match:i}:void 0};else{var a=t;i&&(t=t.toLowerCase());var s=i?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)this.matches=t.length?function(r,i){if(r){var l=e.getLine(i.line).slice(0,i.ch),c=s(l),f=c.lastIndexOf(t);if(f>-1)return f=n(l,c,f),{from:o(i.line,f),to:o(i.line,f+a.length)}}else{var l=e.getLine(i.line).slice(i.ch),c=s(l),f=c.indexOf(t);if(f>-1)return f=n(l,c,f)+i.ch,{from:o(i.line,f),to:o(i.line,f+a.length)}}}:function(){};else{var c=a.split("\n");this.matches=function(t,n){var r=l.length-1;if(t){if(n.line-(l.length-1)<e.fi