From: Benoît Pin Date: Fri, 4 Apr 2014 18:29:58 +0000 (+0200) Subject: Ajout du plugin codemirror. X-Git-Url: https://scm.cri.mines-paristech.fr/git/ckeditor.git/commitdiff_plain/1c760f8ef98dbf02e660ae4d758aae7952026b6f Ajout du plugin codemirror. --- diff --git a/skins/ckeditor/config.js b/skins/ckeditor/config.js index 8fbf6ae..c0cd619 100644 --- a/skins/ckeditor/config.js +++ b/skins/ckeditor/config.js @@ -35,5 +35,5 @@ CKEDITOR.editorConfig = function( config ) config.filebrowserWindowWidth = 801; config.attachmentBrowserConnectorUrl = CKEDITOR.basePath + 'plugins/plinn_image/connectors/plinn/connector'; config.imageMaxDefaultDimension = 500 ; // image inserted will be cropped at this size. - config.extraPlugins = 'plinn_image'; + config.extraPlugins = 'plinn_image,codemirror'; }; \ No newline at end of file diff --git a/skins/ckeditor/plugins/codemirror/css/codemirror.min.css b/skins/ckeditor/plugins/codemirror/css/codemirror.min.css new file mode 100755 index 0000000..292f736 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/css/codemirror.min.css @@ -0,0 +1 @@ +.CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumbers{}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite{}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:none;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-sizer{position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-right:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-right:none;width:auto}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-widget{}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}}.CodeMirror{font:13px/1.4em monospace}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/SearchCode.png") no-repeat}.autoFormat span{background:url("../icons/AutoFormat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/CommentSelectedRange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/UncommentSelectedRange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{white-space:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:rgba(255,150,0,.3)!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline{background:#757575}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:#fff;z-index:15;padding:.1em .8em;overflow:hidden;color:#333}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:#fff}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x} \ No newline at end of file diff --git a/skins/ckeditor/plugins/codemirror/icons/AutoComplete.png b/skins/ckeditor/plugins/codemirror/icons/AutoComplete.png new file mode 100755 index 0000000..fd37b42 Binary files /dev/null and b/skins/ckeditor/plugins/codemirror/icons/AutoComplete.png differ diff --git a/skins/ckeditor/plugins/codemirror/icons/AutoFormat.png b/skins/ckeditor/plugins/codemirror/icons/AutoFormat.png new file mode 100755 index 0000000..d7a53a7 Binary files /dev/null and b/skins/ckeditor/plugins/codemirror/icons/AutoFormat.png differ diff --git a/skins/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png b/skins/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png new file mode 100755 index 0000000..a982fb3 Binary files /dev/null and b/skins/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png differ diff --git a/skins/ckeditor/plugins/codemirror/icons/SearchCode.png b/skins/ckeditor/plugins/codemirror/icons/SearchCode.png new file mode 100755 index 0000000..1dea4b1 Binary files /dev/null and b/skins/ckeditor/plugins/codemirror/icons/SearchCode.png differ diff --git a/skins/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png b/skins/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png new file mode 100755 index 0000000..035f99f Binary files /dev/null and b/skins/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png differ diff --git a/skins/ckeditor/plugins/codemirror/js/beautify.min.js b/skins/ckeditor/plugins/codemirror/js/beautify.min.js new file mode 100755 index 0000000..0390f4f --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/js/beautify.min.js @@ -0,0 +1 @@ +(function(){function n(n,i){"use strict";var r=new t(n,i);return r.beautify()}function t(n,t){"use strict";function ii(n,t){return{mode:t,last_text:n?n.last_text:"",last_word:n?n.last_word:"",var_line:!1,var_line_tainted:!1,var_line_reindented:!1,in_html_comment:!1,multiline_array:!1,if_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n?n.indentation_level+(n.var_line&&n.var_line_reindented?1:0):0,ternary_depth:0}}function ri(n){for(n=n===undefined?!1:n;h.length&&(h[h.length-1]===" "||h[h.length-1]===rt||h[h.length-1]===lt||n&&(h[h.length-1]==="\n"||h[h.length-1]==="\r"));)h.pop()}function kt(n){return n.replace(/^\s\s*|\s\s*$/,"")}function ei(n){n=n.replace(/\x0d/g,"");for(var i=[],t=n.indexOf("\n");t!==-1;)i.push(n.substring(0,t)),n=n.substring(t+1),t=n.indexOf("\n");return n.length&&i.push(n),i}function d(){return h.length&&h[h.length-1]==="\n"}function oi(){return d()&&h.length-1>0&&h[h.length-2]==="\n"}function si(n,t){var i=n.length-1;for(i<0&&(i+=n.length),i>n.length-1&&(i=n.length-1),i++;i-->0;)if(i in n&&n[i]===t)return i;return-1}function at(n){if(n=n===undefined?!1:n,u.wrap_line_length&&!n){var t="",i=0,r=si(h,"\n")+1;r=u.wrap_line_length&&(n=!0))}(u.preserve_newlines&&k||n)&&!d()&&(s(!1,!0),st=!0,k=!1)}function s(n,t){if(st=!1,o=!1,!t&&i.last_text!==";")while(i.mode===l.Statement&&!i.if_block)et();(i.mode===l.ArrayLiteral&&(i.multiline_array=!0),h.length)&&(n||!d())&&h.push("\n")}function hi(){d()&&(u.keep_array_indentation&&nt(i.mode)&&ft.length?h.push(ft.join("")+""):(lt&&h.push(lt),dt(i.indentation_level),dt(i.var_line&&i.var_line_reindented),dt(st)))}function dt(n){if(n===undefined?n=1:typeof n!="number"&&(n=n?1:0),i.last_text!=="")for(var t=0;t0&&(w=i,i=pt.pop())}function gt(){return i.last_text==="do"||i.last_text==="else"&&c!=="if"||f==="TK_END_EXPR"&&(w.mode===l.ForInitializer||w.mode===l.Conditional)?(at(),g(l.Statement),vt(),st=!1,!0):!1}function li(n,t){for(var r,i=0;i=0&&t<32){u+=i==="x"?"\\x"+f:"\\u"+f;continue}else if(t===34||t===39||t===92)u+="\\"+String.fromCharCode(t);else{if(i==="x"&&t>126&&t<=255)return n;u+=String.fromCharCode(t)}}else i==="\\"?e=!0:u+=i;return u}function ui(n){for(var t=r,i=e.charAt(t);v(i,bt)&&i!==n;){if(t++,t>=y)return!1;i=e.charAt(t)}return i===n}function fi(){var t,n,ut,et,c,tt,d,lt,nt,it,p;if(b=0,r>=y)return["","TK_EOF"];for(k=!1,ft=[],n=e.charAt(r),r+=1;v(n,bt);){if(n==="\n"?(b+=1,ft=[]):b&&(n===rt?ft.push(rt):n!=="\r"&&ft.push(" ")),r>=y)return["","TK_EOF"];n=e.charAt(r),r+=1}if(v(n,wt)){if(r=y)break;return r+=2,tt&&b===0?["/*"+c+"*/","TK_INLINE_COMMENT"]:["/*"+c+"*/","TK_BLOCK_COMMENT"]}if(e.charAt(r)==="/"){for(c=n;e.charAt(r)!=="\r"&&e.charAt(r)!=="\n";)if(c+=e.charAt(r),r+=1,r>=y)break;return[c,"TK_COMMENT"]}}if(n==="'"||n==='"'||(n==="/"||u.e4x&&n==="<"&&e.slice(r-1).match(/^<[a-zA-Z:0-9]+\s*([a-zA-Z:0-9]+="[^"]*"\s*)*\/?\s*>/))&&(f==="TK_WORD"&&ht(i.last_text)||f==="TK_END_EXPR"&&v(w.mode,[l.Conditional,l.ForInitializer])||v(f,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var a=n,s=!1,st=!1;if(t=n,r=y)return[t,"TK_STRING"]}else if(u.e4x&&a==="<"){var ct=/<(\/?)([a-zA-Z:0-9]+)\s*([a-zA-Z:0-9]+="[^"]*"\s*)*(\/?)\s*>/g,g=e.slice(r-1),o=ct.exec(g);if(o&&o.index===0){for(lt=o[2],nt=0;o;){var at=!!o[1],vt=o[2],yt=!!o[o.length-1];if(vt!==lt||yt||(at?--nt:++nt),nt<=0)break;o=ct.exec(g)}return it=o?o.index+o[0].length:g.length,r+=it-1,[g.slice(0,it),"TK_STRING"]}}else while(s||e.charAt(r)!==a)if(t+=e.charAt(r),s?((e.charAt(r)==="x"||e.charAt(r)==="u")&&(st=!0),s=!1):s=e.charAt(r)==="\\",r+=1,r>=y)return[t,"TK_STRING"];if(r+=1,t+=a,st&&u.unescape_strings&&(t=ai(t)),a==="/")while(r")return i.in_html_comment=!1,r+=2,["-->","TK_COMMENT"];if(n===".")return[n,"TK_DOT"];if(v(n,ot)){while(r=y)break;return n===","?[n,"TK_COMMA"]:n==="="?[n,"TK_EQUALS"]:[n,"TK_OPERATOR"]}return[n,"TK_UNKNOWN"]}function vi(){if(gt(),c==="["){if(f==="TK_WORD"||i.last_text===")"){v(i.last_text,ut)&&(o=!0),g(l.Expression),a(),u.space_in_paren&&(o=!0);return}nt(i.mode)&&(i.last_text==="["||i.last_text===","&&(it==="]"||it==="}"))&&(u.keep_array_indentation||s())}else i.last_text==="for"?g(l.ForInitializer):v(i.last_text,["if","while"])?g(l.Conditional):g(l.Expression);i.last_text===";"||f==="TK_START_BLOCK"?s():f==="TK_END_EXPR"||f==="TK_START_EXPR"||f==="TK_END_BLOCK"||i.last_text==="."?k&&s():f!=="TK_WORD"&&f!=="TK_OPERATOR"?o=!0:i.last_word==="function"||i.last_word==="typeof"?u.jslint_happy&&(o=!0):(v(i.last_text,ut)||i.last_text==="catch")&&u.space_before_conditional&&(o=!0),c==="("&&(f==="TK_EQUALS"||f==="TK_OPERATOR")&&i.mode!==l.ObjectLiteral&&at(),a(),u.space_in_paren&&(o=!0),c==="["&&(g(l.ArrayLiteral),vt()),ct&&(ct=!1,vt())}function yi(){while(i.mode===l.Statement)et();c==="]"&&nt(i.mode)&&i.multiline_array&&!u.keep_array_indentation&&s(),et(),u.space_in_paren&&(o=!0),a(),i.do_while&&w.mode===l.Conditional&&(w.mode=l.Expression,i.do_block=!1,i.do_while=!1)}function pi(){g(l.BlockStatement);var n=ui("}"),t=n&&i.last_word==="function"&&f==="TK_END_EXPR";u.brace_style==="expand"?f!=="TK_OPERATOR"&&(t||f==="TK_EQUALS"||ht(i.last_text)&&i.last_text!=="else")?o=!0:s():f!=="TK_OPERATOR"&&f!=="TK_START_EXPR"?f==="TK_START_BLOCK"?s():o=!0:nt(w.mode)&&i.last_text===","&&(it==="}"?o=!0:s()),a(),vt()}function wi(){while(i.mode===l.Statement)et();et();var n=f==="TK_START_BLOCK";u.brace_style==="expand"?n||s():n||(nt(i.mode)&&u.keep_array_indentation?(u.keep_array_indentation=!1,s(),u.keep_array_indentation=!0):s()),a()}function bi(){if(gt()||k&&!yt(i.mode)&&(f!=="TK_OPERATOR"||i.last_text==="--"||i.last_text==="++")&&f!=="TK_EQUALS"&&(u.preserve_newlines||i.last_text!=="var")&&s(),i.do_block&&!i.do_while){if(c==="while"){o=!0,a(),o=!0,i.do_while=!0;return}s(),i.do_block=!1}if(ct&&ht(c)&&(ct=!1),i.if_block&&c!=="else"){while(i.mode===l.Statement)et();i.if_block=!1}if(c==="function"){i.var_line&&f!=="TK_EQUALS"&&(i.var_line_reindented=!0),(d()||i.last_text===";"||i.last_text==="}")&&i.last_text!=="{"&&!nt(i.mode)&&(d()||s(!0),oi()||s(!0)),f==="TK_WORD"?i.last_text==="get"||i.last_text==="set"||i.last_text==="new"||i.last_text==="return"?o=!0:s():f==="TK_OPERATOR"||i.last_text==="="?o=!0:yt(i.mode)||s(),a(),i.last_word=c;return}if(c==="case"||c==="default"&&i.in_case_statement){s(),(i.case_body||u.jslint_happy)&&(i.indentation_level--,i.case_body=!1),a(),i.in_case=!0,i.in_case_statement=!0;return}p="NONE",f==="TK_END_BLOCK"?v(c,["else","catch","finally"])?u.brace_style==="expand"||u.brace_style==="end-expand"?p="NEWLINE":(p="SPACE",o=!0):p="NEWLINE":f==="TK_SEMICOLON"&&i.mode===l.BlockStatement?p="NEWLINE":f==="TK_SEMICOLON"&&yt(i.mode)?p="SPACE":f==="TK_STRING"?p="NEWLINE":f==="TK_WORD"?p="SPACE":f==="TK_START_BLOCK"?p="NEWLINE":f==="TK_END_EXPR"&&(o=!0,p="NEWLINE"),v(c,ut)&&i.last_text!==")"&&(p=i.last_text==="else"?"SPACE":"NEWLINE"),(f==="TK_COMMA"||f==="TK_START_EXPR"||f==="TK_EQUALS"||f==="TK_OPERATOR")&&i.mode!==l.ObjectLiteral&&at(),v(c,["else","catch","finally"])?f!=="TK_END_BLOCK"||u.brace_style==="expand"||u.brace_style==="end-expand"?s():(ri(!0),h[h.length-1]!=="}"&&s(),o=!0):p==="NEWLINE"?ht(i.last_text)?o=!0:f!=="TK_END_EXPR"?(f!=="TK_START_EXPR"||c!=="var")&&i.last_text!==":"&&(c==="if"&&i.last_word==="else"&&i.last_text!=="{"?o=!0:(i.var_line=!1,i.var_line_reindented=!1,s())):v(c,ut)&&i.last_text!==")"&&(i.var_line=!1,i.var_line_reindented=!1,s()):nt(i.mode)&&i.last_text===","&&it==="}"?s():p==="SPACE"&&(o=!0),a(),i.last_word=c,c==="var"&&(i.var_line=!0,i.var_line_reindented=!1,i.var_line_tainted=!1),c==="do"&&(i.do_block=!0),c==="if"&&(i.if_block=!0)}function ki(){while(i.mode===l.Statement&&!i.if_block)et();a(),i.var_line=!1,i.var_line_reindented=!1,i.mode===l.ObjectLiteral&&(i.mode=l.BlockStatement)}function di(){gt()?o=!0:f==="TK_WORD"?o=!0:f==="TK_COMMA"||f==="TK_START_EXPR"||f==="TK_EQUALS"||f==="TK_OPERATOR"?i.mode!==l.ObjectLiteral&&at():s(),a()}function gi(){i.var_line&&(i.var_line_tainted=!0),o=!0,a(),o=!0}function nr(){if(i.var_line){(yt(i.mode)||f==="TK_END_BLOCK")&&(i.var_line_tainted=!1),i.var_line&&(i.var_line_reindented=!0),a(),i.var_line_tainted?(i.var_line_tainted=!1,s()):o=!0;return}f==="TK_END_BLOCK"&&i.mode!==l.Expression?(a(),i.mode===l.ObjectLiteral&&i.last_text==="}"?s():o=!0):i.mode===l.ObjectLiteral?(a(),s()):(a(),o=!0)}function tr(){var n=!0,t=!0;if(ht(i.last_text)){o=!0,a();return}if(c==="*"&&f==="TK_DOT"&&!it.match(/^\d+$/)){a();return}if(c===":"&&i.in_case){i.case_body=!0,vt(),a(),s(),i.in_case=!1;return}if(c==="::"){a();return}k&&(c==="--"||c==="++")&&s(),v(c,["--","++","!"])||v(c,["-","+"])&&(v(f,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||v(i.last_text,ut)||i.last_text===",")?(n=!1,t=!1,i.last_text===";"&&yt(i.mode)&&(n=!0),f==="TK_WORD"&&v(i.last_text,ut)&&(n=!0),(i.mode===l.BlockStatement||i.mode===l.Statement)&&(i.last_text==="{"||i.last_text===";")&&s()):c===":"?i.ternary_depth===0?(i.mode===l.BlockStatement&&(i.mode=l.ObjectLiteral),n=!1):i.ternary_depth-=1:c==="?"&&(i.ternary_depth+=1),o=o||n,a(),o=t}function ir(){var n=ei(c),t;if(li(n.slice(1),"*"))for(s(!1,!0),a(n[0]),t=1;t1?s(!1,!0):f==="TK_END_BLOCK"?s(!1,!0):o=!0,a(n[0]),h.push("\n"),t=1;t0;)rt+=u.indent_char,u.indent_size-=1;while(n&&(n.charAt(0)===" "||n.charAt(0)==="\t"))lt+=n.charAt(0),n=n.substring(1);e=n,y=n.length,f="TK_START_BLOCK",it="",h=[],st=!1,o=!1,ft=[],pt=[],g(l.BlockStatement),r=0,this.beautify=function(){for(var t,n,r;;){if(t=fi(),c=t[0],tt=t[1],tt==="TK_EOF")break;if(r=u.keep_array_indentation&&nt(i.mode),r)for(n=0;n0,u.max_preserve_newlines&&b>u.max_preserve_newlines&&(b=u.max_preserve_newlines),u.preserve_newlines&&b>1)for(s(),n=1;n=this.input.length)return n.length?n.join(""):["","TK_EOF"];if(t=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(t,this.Utils.whitespace)){n.length&&(i=!0),this.line_char_count--;continue}else if(i){if(this.line_char_count>=this.max_char){for(n.push("\n"),r=0;r","igm");return u.lastIndex=this.pos,i=u.exec(this.input),t=i?i.index:this.input.length,this.pos=this.input.length)return n&&(this.pos=c,this.line_char_count=l),t.length?t.join(""):["","TK_EOF"];if(u=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(u,this.Utils.whitespace)){e=!0,this.line_char_count--;continue}(u==="'"||u==='"')&&(t[1]&&t[1]==="!"||(u+=this.get_unformatted(u),e=!0)),u==="="&&(e=!1),t.length&&t[t.length-1]!=="="&&u!==">"&&e&&(this.line_char_count>=this.max_char?(this.print_newline(!1,t),this.line_char_count=0):(t.push(" "),this.line_char_count++),e=!1),u==="<"&&(o=this.pos-1),t.push(u)}while(u!==">");return r=t.join(""),a=r.indexOf(" ")!==-1?r.indexOf(" "):r.indexOf(">"),i=r.substring(1,a).toLowerCase(),r.charAt(r.length-2)==="/"||this.Utils.in_array(i,this.Utils.single_token)?n||(this.tag_type="SINGLE"):i==="script"?n||(this.record_tag(i),this.tag_type="SCRIPT"):i==="style"?n||(this.record_tag(i),this.tag_type="STYLE"):this.is_unformatted(i,s)?(f=this.get_unformatted("<\/"+i+">",r),t.push(f),o>0&&this.Utils.in_array(this.input.charAt(o-1),this.Utils.whitespace)&&t.splice(0,0,this.input.charAt(o-1)),h=this.pos-1,this.Utils.in_array(this.input.charAt(h+1),this.Utils.whitespace)&&t.push(this.input.charAt(h+1)),this.tag_type="SINGLE"):i.charAt(0)==="!"?i.indexOf("[if")!==-1?(r.indexOf("!IE")!==-1&&(f=this.get_unformatted("-->",r),t.push(f)),n||(this.tag_type="START")):i.indexOf("[endif")!==-1?(this.tag_type="END",this.unindent()):i.indexOf("[cdata[")!==-1?(f=this.get_unformatted("]\]>",r),t.push(f),n||(this.tag_type="SINGLE")):(f=this.get_unformatted("-->",r),t.push(f),this.tag_type="SINGLE"):n||(i.charAt(0)==="/"?(this.retrieve_tag(i.substring(1)),this.tag_type="END"):(this.record_tag(i),this.tag_type="START"),this.Utils.in_array(i,this.Utils.extra_liners)&&this.print_newline(!0,this.output)),n&&(this.pos=c,this.line_char_count=l),t.join("")},this.get_unformatted=function(n,t){if(t&&t.toLowerCase().indexOf(n)!==-1)return"";var i="",r="",u=!0;do{if(this.pos>=this.input.length)return r;if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace)){if(!u){this.line_char_count--;continue}if(i==="\n"||i==="\r"){r+="\n",this.line_char_count=0;continue}}r+=i,this.line_char_count++,u=!0}while(r.toLowerCase().indexOf(n)===-1);return r},this.get_token=function(){var n,t,i;return this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"?(t=this.last_token.substr(7),n=this.get_contents_to(t),typeof n!="string")?n:[n,"TK_"+t]:this.current_mode==="CONTENT"?(n=this.get_content(),typeof n!="string"?n:[n,"TK_CONTENT"]):this.current_mode==="TAG"?(n=this.get_tag(),typeof n!="string"?n:(i="TK_TAG_"+this.tag_type,[n,i])):void 0},this.get_full_indent=function(n){return(n=this.indent_level+n||0,n<1)?"":Array(n+1).join(this.indent_string)},this.is_unformatted=function(n,t){if(!this.Utils.in_array(n,t))return!1;if(n.toLowerCase()!=="a"||!this.Utils.in_array("a",t))return!0;var r=this.get_tag(!0),i=(r||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!i||this.Utils.in_array(i,t)?!0:!1},this.printer=function(n,t,i,r,u){this.input=n||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=i,this.brace_style=u,this.indent_level=0,this.max_char=r,this.line_char_count=0;for(var f=0;f0&&this.indent_level--}},this}var u,v,y,p,w,s,h,b,c,l,f,o,e,a;for(t=t||{},v=t.indent_size||4,y=t.indent_char||" ",w=t.brace_style||"collapse",p=t.max_char===0?Infinity:t.max_char||250,s=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],u=new k,u.printer(n,y,v,p,w);;){if(h=u.get_token(),u.token_text=h[0],u.token_type=h[1],u.token_type==="TK_EOF")break;switch(u.token_type){case"TK_TAG_START":u.print_newline(!1,u.output),u.print_token(u.token_text),u.indent(),u.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":u.print_newline(!1,u.output),u.print_token(u.token_text),u.current_mode="CONTENT";break;case"TK_TAG_END":u.last_token==="TK_CONTENT"&&u.last_text===""&&(b=u.token_text.match(/\w+/)[0],c=u.output[u.output.length-1].match(/<\s*(\w+)/),(c===null||c[1]!==b)&&u.print_newline(!0,u.output)),u.print_token(u.token_text),u.current_mode="CONTENT";break;case"TK_TAG_SINGLE":l=u.token_text.match(/^\s*<([a-z]+)/i),l&&u.Utils.in_array(l[1],s)||u.print_newline(!1,u.output),u.print_token(u.token_text),u.current_mode="CONTENT";break;case"TK_CONTENT":u.token_text!==""&&u.print_token(u.token_text),u.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(u.token_text!==""){if(u.output.push("\n"),f=u.token_text,e=1,u.token_type==="TK_SCRIPT"?o=typeof i=="function"&&i:u.token_type==="TK_STYLE"&&(o=typeof r=="function"&&r),t.indent_scripts==="keep"?e=0:t.indent_scripts==="separate"&&(e=-u.indent_level),a=u.get_full_indent(e),o)f=o(f.replace(/^\s*/,a),t);else{var d=f.match(/^\s*/)[0],g=d.match(/[^\n\r]*$/)[0].split(u.indent_string).length-1,nt=u.get_full_indent(e-g);f=f.replace(/^\s*/,a).replace(/\r\n|\r|\n/g,"\n"+nt).replace(/\s*$/,"")}f&&(u.print_token(f),u.print_newline(!0,u.output))}u.current_mode="TAG"}u.last_token=u.token_type,u.last_text=u.token_text}return u.output.join("")}if(typeof define=="function")define(function(t,i){var r=t("./beautify.js").js_beautify,u=t("./beautify-css.js").css_beautify;i.html_beautify=function(t,i){return n(t,i,r,u)}});else if(typeof exports!="undefined"){var t=require("./beautify.js").js_beautify,i=require("./beautify-css.js").css_beautify;exports.html_beautify=function(r,u){return n(r,u,t,i)}}else typeof window!="undefined"?window.html_beautify=function(t,i){return n(t,i,window.js_beautify,window.css_beautify)}:typeof global!="undefined"&&(global.html_beautify=function(t,i){return n(t,i,global.js_beautify,global.css_beautify)})}() \ No newline at end of file diff --git a/skins/ckeditor/plugins/codemirror/js/codemirror.addons.min.js b/skins/ckeditor/plugins/codemirror/js/codemirror.addons.min.js new file mode 100755 index 0000000..e1b1d4e --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/js/codemirror.addons.min.js @@ -0,0 +1 @@ +(function(){function n(n,t){var i=n.getRange(CodeMirror.Pos(t.line,t.ch-1),CodeMirror.Pos(t.line,t.ch+1));return i.length==2?i:null}function u(t){for(var u={name:"autoCloseBrackets",Backspace:function(i){if(i.somethingSelected())return CodeMirror.Pass;var r=i.getCursor(),u=n(i,r);if(u&&t.indexOf(u)%2==0)i.replaceRange("",CodeMirror.Pos(r.line,r.ch-1),CodeMirror.Pos(r.line,r.ch+1));else return CodeMirror.Pass}},f="",i=0;i0?s.charAt(o.ch-1):"";if(n==t&&CodeMirror.isWordChar(l))return CodeMirror.Pass;if(s.length==o.ch||f.indexOf(c)>=0||r.test(c))u.replaceSelection(n+t,{head:h,anchor:h});else return CodeMirror.Pass}},n!=t&&(u["'"+t+"'"]=i)})(t.charAt(i),t.charAt(i+1));return u}function f(t){return function(i){var r=i.getCursor(),u=n(i,r);if(!u||t.indexOf(u)%2!=0)return CodeMirror.Pass;i.operation(function(){var n=CodeMirror.Pos(r.line+1,0);i.replaceSelection("\n\n",{anchor:n,head:n},"+input"),i.indentLine(r.line+1,null,!0),i.indentLine(r.line+2,null,!0)})}}var t="()[]{}''\"\"",i="[]{}",r=/\s/;CodeMirror.defineOption("autoCloseBrackets",!1,function(n,r,e){var o,s,h;(e!=CodeMirror.Init&&e&&n.removeKeyMap("autoCloseBrackets"),r)&&(o=t,s=i,typeof r=="string"?o=r:typeof r=="object"&&(r.pairs!=null&&(o=r.pairs),r.explode!=null&&(s=r.explode)),h=u(o),s&&(h.Enter=f(s)),n.addKeyMap(h))})})(),function(){function r(r){var f=r.getCursor(),u=r.getTokenAt(f),h=CodeMirror.innerMode(r.getMode(),u.state),c=h.state,l,s,a;if(h.mode.name!="xml"||!c.tagName)return CodeMirror.Pass;var o=r.getOption("autoCloseTags"),v=h.mode.configuration=="html",y=typeof o=="object"&&o.dontCloseTags||v&&t,p=typeof o=="object"&&o.indentTags||v&&i,e=c.tagName;if(u.end>f.ch&&(e=e.slice(0,e.length-u.end+f.ch)),l=e.toLowerCase(),u.type=="string"&&(u.end!=f.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||u.string.length==1)||u.type=="tag"&&c.type=="closeTag"||u.string.indexOf("/")==u.string.length-1||y&&n(y,l)>-1)return CodeMirror.Pass;s=p&&n(p,l)>-1,a=s?CodeMirror.Pos(f.line+1,0):CodeMirror.Pos(f.line,f.ch+1),r.replaceSelection(">"+(s?"\n\n":"")+"<\/"+e+">",{head:a,anchor:a}),s&&(r.indentLine(f.line+1),r.indentLine(f.line+2))}function u(n){var r=n.getCursor(),t=n.getTokenAt(r),u=CodeMirror.innerMode(n.getMode(),t.state),f=u.state,i;if(t.type=="string"||t.string.charAt(0)!="<"||t.start!=r.ch-1||u.mode.name!="xml")return CodeMirror.Pass;i=f.context&&f.context.tagName,i&&n.replaceSelection("/"+i+">","end")}function n(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i'"]=function(n){return r(n)}),n.addKeyMap(f)}});var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"]}(),function(){function i(n){var e=n.getCursor(),t=n.getTokenAt(e),i=CodeMirror.innerMode(n.getMode(),t.state).mode,r,o,u,f,s;if(t.type=="comment"&&i.blockCommentStart&&(o=t.string.indexOf(i.blockCommentEnd),u=n.getRange(CodeMirror.Pos(e.line,0),CodeMirror.Pos(e.line,t.end)),o==-1||o!=t.string.length-i.blockCommentEnd.length))if(t.string.indexOf(i.blockCommentStart)==0){if(r=u.slice(0,t.start),!/^\s*$/.test(r))for(r="",s=0;st.start&&/^\s*$/.test(u.slice(0,f))&&(r=u.slice(0,f));if(r!=null)n.replaceSelection("\n"+r+i.blockCommentContinue,"end");else return CodeMirror.Pass}for(var t=["clike","css","javascript"],n=0;nk)return null;for(f!=null&&(e=f+a);e!=c;e+=a)if(s=r.text.charAt(e),g.test(s)&&t.getTokenTypeAt(n(u,e+1))==d)if(h=i[s],h.charAt(1)==">"==o)v.push(s);else{if(v.pop()!=h.charAt(0))return{pos:e,match:!1};if(!v.length)return{pos:e,match:!0}}}}var c=t.state.matchBrackets,k=c&&c.maxScanLineLength||1e4,y=c&&c.maxScanLines||100,s=r||t.getCursor(),l=t.getLineHandle(s.line),e=s.ch-1,p=e>=0&&i[l.text.charAt(e)]||i[l.text.charAt(++e)],o,a,f,h,b;if(!p||(o=p.charAt(1)==">",a=o?1:-1,u&&o!=(e==s.ch)))return null;var d=t.getTokenTypeAt(n(s.line,e+1)),v=[l.text.charAt(e)],g=/[(){}[\]]/;for(f=s.line,b=o?Math.min(f+y,t.lineCount()):Math.max(-1,f-y);f!=b;f+=a)if(h=f==s.line?w(l,f,e):w(t.getLineHandle(f),f),h)break;return{from:n(s.line,e),to:h&&n(f,h.pos),match:h&&h.match,forward:o}}function u(t,i){var o=t.state.matchBrackets.maxHighlightLineLength||1e3,u=r(t),f;if(u&&!(t.getLine(u.from.line).length>o)&&(!u.to||!(t.getLine(u.to.line).length>o))){var s=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",c=t.markText(u.from,n(u.from.line,u.from.ch+1),{className:s}),h=u.to&&t.markText(u.to,n(u.to.line,u.to.ch+1),{className:s});if(e&&t.state.focused&&t.display.input.focus(),f=function(){t.operation(function(){c.clear(),h&&h.clear()})},i)setTimeout(f,800);else return f}}function f(n){n.operation(function(){t&&(t(),t=null),n.somethingSelected()||(t=u(n,!1))})}var e=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),n=CodeMirror.Pos,i={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},t=null;CodeMirror.defineOption("matchBrackets",!1,function(n,t,i){if(i&&i!=CodeMirror.Init&&n.off("cursorActivity",f),t){n.state.matchBrackets=typeof t=="object"?t:{};n.on("cursorActivity",f)}}),CodeMirror.defineExtension("matchBrackets",function(){u(this,!0)}),CodeMirror.defineExtension("findMatchingBracket",function(n,t){return r(this,n,t)})}(),function(){"use strict";function t(n){n.state.tagHit&&n.state.tagHit.clear(),n.state.tagOther&&n.state.tagOther.clear(),n.state.tagHit=n.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){var u,r,i,f,e;(t(n),n.somethingSelected())||(u=n.getCursor(),r=n.getViewport(),r.from=Math.min(r.from,u.line),r.to=Math.max(u.line+1,r.to),i=CodeMirror.findMatchingTag(n,u,r),i)&&(n.state.matchBothTags&&(f=i.at=="open"?i.open:i.close,f&&(n.state.tagHit=n.markText(f.from,f.to,{className:"CodeMirror-matchingtag"}))),e=i.at=="close"?i.open:i.close,e?n.state.tagOther=n.markText(e.from,e.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0)})}function i(t){t.state.failedTagMatch&&n(t)}CodeMirror.defineOption("matchTags",!1,function(r,u,f){if(f&&f!=CodeMirror.Init&&(r.off("cursorActivity",n),r.off("viewportChange",i),t(r)),u){r.state.matchBothTags=typeof u=="object"&&u.bothTags;r.on("cursorActivity",n);r.on("viewportChange",i);n(r)}}),CodeMirror.commands.toMatchingTag=function(n){var t=CodeMirror.findMatchingTag(n,n.getCursor()),i;t&&(i=t.at=="close"?t.open:t.close,i&&n.setSelection(i.to,i.from))}}(),CodeMirror.defineOption("showTrailingSpace",!1,function(n,t,i){i==CodeMirror.Init&&(i=!1),i&&!t?n.removeOverlay("trailingspace"):!i&&t&&n.addOverlay({token:function(n){for(var i=n.string.length,t=i;t&&/\s/.test(n.string.charAt(t-1));--t);return t>n.pos?(n.pos=t,null):(n.pos=i,"trailingspace")},name:"trailingspace"})}),function(){"use strict";function n(n,i,r,u){function c(t){var r=e(n,i),o,f;if(!r||r.to.line-r.from.linen.firstLine())i=CodeMirror.Pos(i.line-1,0),f=c(!1);if(f&&!f.cleared&&u!=="unfold"){o=t(r);CodeMirror.on(o,"mousedown",function(){s.clear()});s=n.markText(f.from,f.to,{replacedWith:o,clearOnEnter:!0,__isFold:!0});s.on("clear",function(t,i){CodeMirror.signal(n,"unfold",n,t,i)});CodeMirror.signal(n,"fold",n,f.from,f.to)}}}function t(n){var t=n&&n.widget||"↔",i;return typeof t=="string"&&(i=document.createTextNode(t),t=document.createElement("span"),t.appendChild(i),t.className="CodeMirror-foldmarker"),t}CodeMirror.newFoldFunction=function(t,i){return function(r,u){n(r,u,{rangeFinder:t,widget:i})}},CodeMirror.defineExtension("foldCode",function(t,i,r){n(this,t,i,r)}),CodeMirror.registerHelper("fold","combine",function(){var n=Array.prototype.slice.call(arguments,0);return function(t,i){for(var u,r=0;rn.lastLine()||(i=n.getTokenAt(CodeMirror.Pos(t,1)),/\S/.test(i.string)||(i=n.getTokenAt(CodeMirror.Pos(t,i.end+1))),i.type!="keyword"||i.string!="import"))return null;for(r=t,f=Math.min(n.lastLine(),t+10);r<=f;++r)if(e=n.getLine(r),u=e.indexOf(";"),u!=-1)return{startCh:i.end,end:CodeMirror.Pos(r,u)}}var t=t.line,u=i(t),e,r,f;if(!u||i(t-1)||(e=i(t-2))&&e.end.line==t-1)return null;for(r=u.end;;){if(f=i(r.line+1),f==null)break;r=f.end}return{from:n.clipPos(CodeMirror.Pos(t,u.startCh+1)),to:r}}),CodeMirror.importRangeFinder=CodeMirror.fold["import"],CodeMirror.registerHelper("fold","include",function(n,t){function r(t){if(tn.lastLine())return null;var i=n.getTokenAt(CodeMirror.Pos(t,1));return/\S/.test(i.string)||(i=n.getTokenAt(CodeMirror.Pos(t,i.end+1))),i.type=="meta"&&i.string.slice(0,8)=="#include"?i.start+8:void 0}var t=t.line,u=r(t),i,f;if(u==null||r(t-1)!=null)return null;for(i=t;;){if(f=r(i+1),f==null)break;++i}return{from:CodeMirror.Pos(t,u+1),to:n.clipPos(CodeMirror.Pos(i))}}),CodeMirror.includeRangeFinder=CodeMirror.fold.include,function(){"use strict";function a(n,t){return n.line-t.line||n.ch-t.ch}function t(n,t,i,r){this.line=t,this.ch=i,this.cm=n,this.text=n.getLine(t),this.min=r?r.from:n.firstLine(),this.max=r?r.to-1:n.lastLine()}function r(t,i){var r=t.cm.getTokenTypeAt(n(t.line,i));return r&&/\btag\b/.test(r)}function s(n){if(!(n.line>=n.max))return n.ch=0,n.text=n.cm.getLine(++n.line),!0}function h(n){if(!(n.line<=n.min))return n.text=n.cm.getLine(--n.line),n.ch=n.text.length,!0}function u(n){for(var t,i,u;;){if(t=n.text.indexOf(">",n.ch),t==-1)if(s(n))continue;else return;if(!r(n,t+1)){n.ch=t+1;continue}return i=n.text.lastIndexOf("/",t),u=i>-1&&!/\S/.test(n.text.slice(i+1,t)),n.ch=t+1,u?"selfClose":"regular"}}function f(n){for(var t,u;;){if(t=n.ch?n.text.lastIndexOf("<",n.ch-1):-1,t==-1)if(h(n))continue;else return;if(!r(n,t+1)){n.ch=t;continue}if(i.lastIndex=t,n.ch=t,u=i.exec(n.text),u&&u.index==t)return u}}function c(n){for(;;){i.lastIndex=n.ch;var t=i.exec(n.text);if(!t)if(s(n))continue;else return;if(!r(n,t.index+1)){n.ch=t.index+1;continue}return n.ch=t.index+t[0].length,t}}function y(n){for(var t,i,u;;){if(t=n.ch?n.text.lastIndexOf(">",n.ch-1):-1,t==-1)if(h(n))continue;else return;if(!r(n,t+1)){n.ch=t;continue}return i=n.text.lastIndexOf("/",t),u=i>-1&&!/\S/.test(n.text.slice(i+1,t)),n.ch=t+1,u?"selfClose":"regular"}}function e(t,i){for(var e=[],f;;){var r=c(t),o,s=t.line,h=t.ch-(r?r[0].length:0);if(!r||!(o=u(t)))return;if(o!="selfClose")if(r[1]){for(f=e.length-1;f>=0;--f)if(e[f]==r[2]){e.length=f;break}if(f<0&&(!i||i==r[2]))return{tag:r[2],from:n(s,h),to:n(t.line,t.ch)}}else e.push(r[2])}}function l(t,i){for(var e=[],o,u;;){if(o=y(t),!o)return;if(o=="selfClose"){f(t);continue}var s=t.line,h=t.ch,r=f(t);if(!r)return;if(r[1])e.push(r[2]);else{for(u=e.length-1;u>=0;--u)if(e[u]==r[2]){e.length=u;break}if(u<0&&(!i||i==r[2]))return{tag:r[2],from:n(t.line,t.ch),to:n(s,h)}}}}var n=CodeMirror.Pos,o="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",v=o+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i=new RegExp("<(/?)(["+o+"]["+v+"]*)","g");CodeMirror.registerHelper("fold","xml",function(i,r){for(var f=new t(i,r.line,0),o,h,r,s;;){if(o=c(f),!o||f.line!=r.line||!(h=u(f)))return;if(!o[1]&&h!="selfClose")return r=n(f.line,f.ch),s=e(f,o[2]),s&&{from:r,to:s.from}}}),CodeMirror.tagRangeFinder=CodeMirror.fold.xml,CodeMirror.findMatchingTag=function(i,r,o){var s=new t(i,r.line,r.ch,o),y;if(s.text.indexOf(">")!=-1||s.text.indexOf("<")!=-1){var c=u(s),v=c&&n(s.line,s.ch),h=c&&f(s);if(c&&c!="selfClose"&&h&&!(a(s,r)>0))return y={from:n(s.line,s.ch),to:v,tag:h[2]},h[1]?{open:l(s,h[2]),close:y,at:"close"}:(s=new t(i,v.line,v.ch,o),{open:y,close:e(s,h[2]),at:"open"})}},CodeMirror.findEnclosingTag=function(n,i,r){for(var s=new t(n,i.line,i.ch,r),u,o,f;;){if(u=l(s),!u)break;if(o=new t(n,i.line,i.ch,r),f=e(o,u.tag),f)return{open:u,close:f}}}}(),function(){CodeMirror.defineExtension("autoFormatAll",function(n,t){function v(){h+="\n",e=!0,++a}for(var r=this,f=r.getMode(),o=r.getRange(n,t).split("\n"),s=CodeMirror.copyState(f,r.getTokenAt(n).state),y=r.getOption("tabSize"),h="",a=0,e=n.ch==0,i,u=0;ur&&(f+=e(t.substring(r,u[i].start)),r=u[i].start),u[i].start<=r&&u[i].end>=r&&(f+=t.substring(r,u[i].end),r=u[i].end);r",noBreak:!1,noBreakEmpty:null,tagType:"",tagName:"",isXML:!1,newlineAfterToken:function(n,t,i){var o="a|b|bdi|bdo|big|center|cite|del|em|font|i|img|ins|s|small|span|strike|strong|sub|sup|u",e="label|li|option|textarea|title|"+o,f=!1,r=null,u="",s;if(this.isXML=this.configuration=="xml"?!0:!1,n=="comment"||/"))}else{if(I.match("DOCTYPE",true,true)){I.eatWhile(/[\w\._\-]/);return F(C(1))}else{return null}}}}else{if(I.eat("?")){I.eatWhile(/[\w\._\-]/);H.tokenize=x("meta","?>");return"meta"}else{var D=I.eat("/");g="";var J;while((J=I.eat(/[^\s\u00a0=<>\"\'\/?]/))){g+=J}if(!g){return"tag error"}h=D?"closeTag":"openTag";H.tokenize=o;return"tag"}}}else{if(G=="&"){var E;if(I.eat("#")){if(I.eat("x")){E=I.eatWhile(/[a-fA-F\d]/)&&I.eat(";")}else{E=I.eatWhile(/[\d]/)&&I.eat(";")}}else{E=I.eatWhile(/[\w\.\-:]/)&&I.eat(";")}return E?"atom":"error"}else{I.eatWhile(/[^&<]/);return null}}}function o(G,F){var E=G.next();if(E==">"||(E=="/"&&G.eat(">"))){F.tokenize=p;h=E==">"?"endTag":"selfcloseTag";return"tag"}else{if(E=="="){h="equals";return null}else{if(E=="<"){F.tokenize=p;var D=F.tokenize(G,F);return D?D+" error":"error"}else{if(/[\'\"]/.test(E)){F.tokenize=k(E);F.stringStartCol=G.column();return F.tokenize(G,F)}else{G.eatWhile(/[^\s\u00a0=<>\"\']/);return"word"}}}}}function k(D){var E=function(G,F){while(!G.eol()){if(G.next()==D){F.tokenize=o;break}}return"string"};E.isInAttribute=true;return E}function x(E,D){return function(G,F){while(!G.eol()){if(G.match(D)){F.tokenize=p;break}G.next()}return E}}function C(D){return function(G,F){var E;while((E=G.next())!=null){if(E=="<"){F.tokenize=C(D+1);return F.tokenize(G,F)}else{if(E==">"){if(D==1){F.tokenize=p;break}else{F.tokenize=C(D-1);return F.tokenize(G,F)}}}}return"meta"}}var m,z,i;function a(){for(var D=arguments.length-1;D>=0;D--){m.cc.push(arguments[D])}}function f(){a.apply(null,arguments);return true}function j(D,F){var E=y.doNotIndent.hasOwnProperty(D)||(m.context&&m.context.noIndent);m.context={prev:m.context,tagName:D,indent:m.indented,startOfLine:F,noIndent:E}}function v(){if(m.context){m.context=m.context.prev}}function e(D){if(D=="openTag"){m.tagName=g;m.tagStart=z.column();return f(n,d(m.startOfLine))}else{if(D=="closeTag"){var E=false;if(m.context){if(m.context.tagName!=g){if(y.implicitlyClosed.hasOwnProperty(m.context.tagName.toLowerCase())){v()}E=!m.context||m.context.tagName!=g}}else{E=true}if(E){i="error"}return f(t(E))}}return f()}function d(D){return function(F){var E=m.tagName;m.tagName=m.tagStart=null;if(F=="selfcloseTag"||(F=="endTag"&&y.autoSelfClosers.hasOwnProperty(E.toLowerCase()))){r(E.toLowerCase());return f()}if(F=="endTag"){r(E.toLowerCase());j(E,D);return f()}return f()}}function t(D){return function(E){if(D){i="error"}if(E=="endTag"){v();return f()}i="error";return f(arguments.callee)}}function r(E){var D;while(true){if(!m.context){return}D=m.context.tagName.toLowerCase();if(!y.contextGrabbers.hasOwnProperty(D)||!y.contextGrabbers[D].hasOwnProperty(E)){return}v()}}function n(D){if(D=="word"){i="attribute";return f(q,n)}if(D=="endTag"||D=="selfcloseTag"){return a()}i="error";return f(n)}function q(D){if(D=="equals"){return f(w,n)}if(!y.allowMissing){i="error"}else{if(D=="word"){i="attribute";return f(q,n)}}return(D=="endTag"||D=="selfcloseTag")?a():f()}function w(D){if(D=="string"){return f(u)}if(D=="word"&&y.allowUnquoted){i="string";return f()}i="error";return(D=="endTag"||D=="selfCloseTag")?a():f()}function u(D){if(D=="string"){return f(u)}else{return a()}}return{startState:function(){return{tokenize:p,cc:[],indented:0,startOfLine:true,tagName:null,tagStart:null,context:null}},token:function(G,F){if(!F.tagName&&G.sol()){F.startOfLine=true;F.indented=G.indentation()}if(G.eatSpace()){return null}i=h=g=null;var E=F.tokenize(G,F);F.type=h;if((E||h)&&E!="comment"){m=F;z=G;while(true){var D=F.cc.pop()||e;if(D(h||E)){break}}}F.startOfLine=false;if(i){E=i=="error"?E+" error":i}return E},indent:function(G,D,F){var E=G.context;if(G.tokenize.isInAttribute){return G.stringStartCol+1}if((G.tokenize!=o&&G.tokenize!=p)||E&&E.noIndent){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(c){return G.tagStart+G.tagName.length+2}else{return G.tagStart+s*A}}if(b&&/",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("javascript",function(U,af){var i=U.indentUnit;var v=af.statementIndent;var u=af.json;var e=af.typescript;var al=function(){function aH(aJ){return{type:aJ,style:"keyword"}}var aC=aH("keyword a"),aA=aH("keyword b"),az=aH("keyword c");var aB=aH("operator"),aF={type:"atom",style:"atom"};var aD={"if":aH("if"),"while":aC,"with":aC,"else":aA,"do":aA,"try":aA,"finally":aA,"return":az,"break":az,"continue":az,"new":az,"delete":az,"throw":az,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aB,"typeof":aB,"instanceof":aB,"true":aF,"false":aF,"null":aF,"undefined":aF,"NaN":aF,"Infinity":aF,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:az,"export":aH("export"),"import":aH("import"),"extends":az};if(e){var aI={type:"variable",style:"variable-3"};var aE={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aI,number:aI,bool:aI,any:aI};for(var aG in aE){aD[aG]=aE[aG]}}return aD}();var J=/[+\-*&%=<>!?|~^]/;function ab(aC,az){var aB=false,aA;while((aA=aC.next())!=null){if(aA==az&&!aB){return false}aB=!aB&&aA=="\\"}return aB}var M,A;function F(aB,aA,az){M=aB;A=az;return aA}function O(aD,aB){var az=aD.next();if(az=='"'||az=="'"){aB.tokenize=L(az);return aB.tokenize(aD,aB)}else{if(az=="."&&aD.match(/^\d+(?:[eE][+\-]?\d+)?/)){return F("number","number")}else{if(az=="."&&aD.match("..")){return F("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(az)){return F(az)}else{if(az=="="&&aD.eat(">")){return F("=>")}else{if(az=="0"&&aD.eat(/x/i)){aD.eatWhile(/[\da-f]/i);return F("number","number")}else{if(/\d/.test(az)){aD.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return F("number","number")}else{if(az=="/"){if(aD.eat("*")){aB.tokenize=aq;return aq(aD,aB)}else{if(aD.eat("/")){aD.skipToEnd();return F("comment","comment")}else{if(aB.lastType=="operator"||aB.lastType=="keyword c"||aB.lastType=="sof"||/^[\[{}\(,;:]$/.test(aB.lastType)){ab(aD,"/");aD.eatWhile(/[gimy]/);return F("regexp","string-2")}else{aD.eatWhile(J);return F("operator",null,aD.current())}}}}else{if(az=="`"){aB.tokenize=ar;return ar(aD,aB)}else{if(az=="#"){aD.skipToEnd();return F("error","error")}else{if(J.test(az)){aD.eatWhile(J);return F("operator",null,aD.current())}else{aD.eatWhile(/[\w\$_]/);var aC=aD.current(),aA=al.propertyIsEnumerable(aC)&&al[aC];return(aA&&aB.lastType!=".")?F(aA.type,aA.style,aC):F("variable","variable",aC)}}}}}}}}}}}}function L(az){return function(aB,aA){if(!ab(aB,az)){aA.tokenize=O}return F("string","string")}}function aq(aC,aB){var az=false,aA;while(aA=aC.next()){if(aA=="/"&&az){aB.tokenize=O;break}az=(aA=="*")}return F("comment","comment")}function ar(aC,aA){var aB=false,az;while((az=aC.next())!=null){if(!aB&&(az=="`"||az=="$"&&aC.eat("{"))){aA.tokenize=O;break}aB=!aB&&az=="\\"}return F("quasi","string-2",aC.current())}var j="([{}])";function ao(aF,aC){if(aC.fatArrowAt){aC.fatArrowAt=null}var aB=aF.string.indexOf("=>",aF.start);if(aB<0){return}var aE=0,aA=false;for(var aG=aB-1;aG>=0;--aG){var az=aF.string.charAt(aG);var aD=j.indexOf(az);if(aD>=0&&aD<3){if(!aE){++aG;break}if(--aE==0){break}}else{if(aD>=3&&aD<6){++aE}else{if(/[$\w]/.test(az)){aA=true}else{if(aA&&!aE){++aG;break}}}}}if(aA&&!aE){aC.fatArrowAt=aG}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function D(aE,aA,az,aD,aB,aC){this.indented=aE;this.column=aA;this.type=az;this.prev=aB;this.info=aC;if(aD!=null){this.align=aD}}function n(aC,aB){for(var aA=aC.localVars;aA;aA=aA.next){if(aA.name==aB){return true}}for(var az=aC.context;az;az=az.prev){for(var aA=az.vars;aA;aA=aA.next){if(aA.name==aB){return true}}}}function d(aD,aA,az,aC,aE){var aF=aD.cc;y.state=aD;y.stream=aE;y.marked=null,y.cc=aF;if(!aD.lexical.hasOwnProperty("align")){aD.lexical.align=true}while(true){var aB=aF.length?aF.pop():u?aj:ax;if(aB(az,aC)){while(aF.length&&aF[aF.length-1].lex){aF.pop()()}if(y.marked){return y.marked}if(az=="variable"&&n(aD,aC)){return"variable-2"}return aA}}}var y={state:null,column:null,marked:null,cc:null};function V(){for(var az=arguments.length-1;az>=0;az--){y.cc.push(arguments[az])}}function Z(){V.apply(null,arguments);return true}function an(aA){function az(aD){for(var aC=aD;aC;aC=aC.next){if(aC.name==aA){return true}}return false}var aB=y.state;if(aB.context){y.marked="def";if(az(aB.localVars)){return}aB.localVars={name:aA,next:aB.localVars}}else{if(az(aB.globalVars)){return}if(af.globalVars){aB.globalVars={name:aA,next:aB.globalVars}}}}var l={name:"this",next:{name:"arguments"}};function r(){y.state.context={prev:y.state.context,vars:y.state.localVars};y.state.localVars=l}function s(){y.state.localVars=y.state.context.vars;y.state.context=y.state.context.prev}function av(aA,aB){var az=function(){var aD=y.state,aC=aD.indented;if(aD.lexical.type=="stat"){aC=aD.lexical.indented}aD.lexical=new D(aC,y.stream.column(),aA,null,aD.lexical,aB)};az.lex=true;return az}function f(){var az=y.state;if(az.lexical.prev){if(az.lexical.type==")"){az.indented=az.lexical.indented}az.lexical=az.lexical.prev}}f.lex=true;function m(az){return function(aA){if(aA==az){return Z()}else{if(az==";"){return V()}else{return Z(arguments.callee)}}}}function ax(az,aA){if(az=="var"){return Z(av("vardef",aA.length),b,m(";"),f)}if(az=="keyword a"){return Z(av("form"),aj,ax,f)}if(az=="keyword b"){return Z(av("form"),ax,f)}if(az=="{"){return Z(av("}"),t,f)}if(az==";"){return Z()}if(az=="if"){return Z(av("form"),aj,ax,f,c)}if(az=="function"){return Z(G)}if(az=="for"){return Z(av("form"),p,f,ax,f)}if(az=="variable"){return Z(av("stat"),ay)}if(az=="switch"){return Z(av("form"),aj,av("}","switch"),m("{"),t,f,f)}if(az=="case"){return Z(aj,m(":"))}if(az=="default"){return Z(m(":"))}if(az=="catch"){return Z(av("form"),r,m("("),aa,m(")"),ax,f,s)}if(az=="module"){return Z(av("form"),r,B,s,f)}if(az=="class"){return Z(av("form"),Q,P,f)}if(az=="export"){return Z(av("form"),aw,f)}if(az=="import"){return Z(av("form"),ac,f)}return V(av("stat"),aj,m(";"),f)}function aj(az){return T(az,false)}function au(az){return T(az,true)}function T(aA,aC){if(y.state.fatArrowAt==y.stream.start){var az=aC?H:R;if(aA=="("){return Z(r,am(g,")"),m("=>"),az,s)}else{if(aA=="variable"){return V(r,g,m("=>"),az,s)}}}var aB=aC?h:W;if(a.hasOwnProperty(aA)){return Z(aB)}if(aA=="function"){return Z(G)}if(aA=="keyword c"){return Z(aC?ag:ae)}if(aA=="("){return Z(av(")"),ae,ap,m(")"),f,aB)}if(aA=="operator"||aA=="spread"){return Z(aC?au:aj)}if(aA=="["){return Z(av("]"),au,ai,f,aB)}if(aA=="{"){return Z(am(o,"}"),aB)}return Z()}function ae(az){if(az.match(/[;\}\)\],]/)){return V()}return V(aj)}function ag(az){if(az.match(/[;\}\)\],]/)){return V()}return V(au)}function W(az,aA){if(az==","){return Z(aj)}return h(az,aA,false)}function h(az,aB,aD){var aA=aD==false?W:h;var aC=aD==false?aj:au;if(aB=="=>"){return Z(r,aD?H:R,s)}if(az=="operator"){if(/\+\+|--/.test(aB)){return Z(aA)}if(aB=="?"){return Z(aj,m(":"),aC)}return Z(aC)}if(az=="quasi"){y.cc.push(aA);return K(aB)}if(az==";"){return}if(az=="("){return Z(am(au,")","call"),aA)}if(az=="."){return Z(ah,aA)}if(az=="["){return Z(av("]"),ae,m("]"),f,aA)}}function K(az){if(!az){}if(az.slice(az.length-2)!="${"){return Z()}return Z(aj,k)}function k(az){if(az=="}"){y.marked="string-2";y.state.tokenize=ar;return Z()}}function R(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(aj)}function H(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(au)}function ay(az){if(az==":"){return Z(f,ax)}return V(W,m(";"),f)}function ah(az){if(az=="variable"){y.marked="property";return Z()}}function o(az,aA){if(az=="variable"){y.marked="property";if(aA=="get"||aA=="set"){return Z(C)}}else{if(az=="number"||az=="string"){y.marked=az+" property"}else{if(az=="["){return Z(aj,m("]"),E)}}}if(a.hasOwnProperty(az)){return Z(E)}}function C(az){if(az!="variable"){return V(E)}y.marked="property";return Z(G)}function E(az){if(az==":"){return Z(au)}if(az=="("){return V(G)}}function am(aC,az,aB){function aA(aE){if(aE==","){var aD=y.state.lexical;if(aD.info=="call"){aD.pos=(aD.pos||0)+1}return Z(aC,aA)}if(aE==az){return Z()}return Z(m(az))}return function(aD){if(aD==az){return Z()}if(aB===false){return V(aC,aA)}return V(av(az,aB),aC,aA,f)}}function t(az){if(az=="}"){return Z()}return V(ax,t)}function N(az){if(e&&az==":"){return Z(Y)}}function Y(az){if(az=="variable"){y.marked="variable-3";return Z()}}function b(){return V(g,N,X,S)}function g(az,aA){if(az=="variable"){an(aA);return Z()}if(az=="["){return Z(am(g,"]"))}if(az=="{"){return Z(am(at,"}"))}}function at(az,aA){if(az=="variable"&&!y.stream.match(/^\s*:/,false)){an(aA);return Z(X)}if(az=="variable"){y.marked="property"}return Z(m(":"),g,X)}function X(az,aA){if(aA=="="){return Z(au)}}function S(az){if(az==","){return Z(b)}}function c(az,aA){if(az=="keyword b"&&aA=="else"){return Z(av("form"),ax,f)}}function p(az){if(az=="("){return Z(av(")"),z,m(")"))}}function z(az){if(az=="var"){return Z(b,m(";"),x)}if(az==";"){return Z(x)}if(az=="variable"){return Z(q)}return V(aj,m(";"),x)}function q(az,aA){if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return Z(W,x)}function x(az,aA){if(az==";"){return Z(w)}if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return V(aj,m(";"),w)}function w(az){if(az!=")"){Z(aj)}}function G(az,aA){if(aA=="*"){y.marked="keyword";return Z(G)}if(az=="variable"){an(aA);return Z(G)}if(az=="("){return Z(r,am(aa,")"),ax,s)}}function aa(az){if(az=="spread"){return Z(aa)}return V(g,N)}function Q(az,aA){if(az=="variable"){an(aA);return Z(I)}}function I(az,aA){if(aA=="extends"){return Z(aj)}}function P(az){if(az=="{"){return Z(am(o,"}"))}}function B(az,aA){if(az=="string"){return Z(ax)}if(az=="variable"){an(aA);return Z(ad)}}function aw(az,aA){if(aA=="*"){y.marked="keyword";return Z(ad,m(";"))}if(aA=="default"){y.marked="keyword";return Z(aj,m(";"))}return V(ax)}function ac(az){if(az=="string"){return Z()}return V(ak,ad)}function ak(az,aA){if(az=="{"){return Z(am(ak,"}"))}if(az=="variable"){an(aA)}return Z()}function ad(az,aA){if(aA=="from"){y.marked="keyword";return Z(aj)}}function ai(az){if(az=="for"){return V(ap)}if(az==","){return Z(am(au,"]",false))}return V(am(au,"]",false))}function ap(az){if(az=="for"){return Z(p,ap)}if(az=="if"){return Z(aj,ap)}}return{startState:function(aA){var az={tokenize:O,lastType:"sof",cc:[],lexical:new D((aA||0)-i,0,"block",false),localVars:af.localVars,context:af.localVars&&{vars:af.localVars},indented:0};if(af.globalVars){az.globalVars=af.globalVars}return az},token:function(aB,aA){if(aB.sol()){if(!aA.lexical.hasOwnProperty("align")){aA.lexical.align=false}aA.indented=aB.indentation();ao(aB,aA)}if(aA.tokenize!=aq&&aB.eatSpace()){return null}var az=aA.tokenize(aB,aA);if(M=="comment"){return az}aA.lastType=M=="operator"&&(A=="++"||A=="--")?"incdec":M;return d(aA,az,M,A,aB)},indent:function(aF,az){if(aF.tokenize==aq){return CodeMirror.Pass}if(aF.tokenize!=O){return 0}var aE=az&&az.charAt(0),aC=aF.lexical;for(var aB=aF.cc.length-1;aB>=0;--aB){var aG=aF.cc[aB];if(aG==f){aC=aC.prev}else{if(aG!=c){break}}}if(aC.type=="stat"&&aE=="}"){aC=aC.prev}if(v&&aC.type==")"&&aC.prev.type=="stat"){aC=aC.prev}var aD=aC.type,aA=aE==aD;if(aD=="vardef"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?aC.info+1:0)}else{if(aD=="form"&&aE=="{"){return aC.indented}else{if(aD=="form"){return aC.indented+i}else{if(aD=="stat"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?v||i:0)}else{if(aC.info=="switch"&&!aA&&af.doubleIndentSwitch!=false){return aC.indented+(/^(?:case|default)\b/.test(az)?i:2*i)}else{if(aC.align){return aC.column+(aA?0:1)}else{return aC.indented+(aA?0:i)}}}}}}},electricChars:":{}",blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",lineComment:u?null:"//",fold:"brace",helperType:u?"json":"javascript",jsonMode:u}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});CodeMirror.defineMode("css",function(b,d){if(!d.propertyKeywords){d=CodeMirror.resolveMode("text/css")}var e=b.indentUnit||b.tabSize||2,o=d.hooks||{},n=d.atMediaTypes||{},k=d.atMediaFeatures||{},j=d.propertyKeywords||{},l=d.colorKeywords||{},h=d.valueKeywords||{},a=!!d.allowNested,i=null;function g(p,q){i=q;return p}function c(s,r){var q=s.next();if(o[q]){var p=o[q](s,r);if(p!==false){return p}}if(q=="@"){s.eatWhile(/[\w\\\-]/);return g("def",s.current())}else{if(q=="="){g(null,"compare")}else{if((q=="~"||q=="|")&&s.eat("=")){return g(null,"compare")}else{if(q=='"'||q=="'"){r.tokenize=m(q);return r.tokenize(s,r)}else{if(q=="#"){s.eatWhile(/[\w\\\-]/);return g("atom","hash")}else{if(q=="!"){s.match(/^\s*\w*/);return g("keyword","important")}else{if(/\d/.test(q)||q=="."&&s.eat(/\d/)){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(q==="-"){if(/\d/.test(s.peek())){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(s.match(/^[^-]+-/)){return g("meta","meta")}}}else{if(/[,+>*\/]/.test(q)){return g(null,"select-op")}else{if(q=="."&&s.match(/^-?[_a-z][_a-z0-9-]*/i)){return g("qualifier","qualifier")}else{if(q==":"){return g("operator",q)}else{if(/[;{}\[\]\(\)]/.test(q)){return g(null,q)}else{if(q=="u"&&s.match("rl(")){s.backUp(1);r.tokenize=f;return g("property","variable")}else{s.eatWhile(/[\w\\\-]/);return g("property","variable")}}}}}}}}}}}}}}function m(p,q){return function(u,s){var t=false,r;while((r=u.next())!=null){if(r==p&&!t){break}t=!t&&r=="\\"}if(!t){if(q){u.backUp(1)}s.tokenize=c}return g("string","string")}}function f(q,p){q.next();if(!q.match(/\s*[\"\']/,false)){p.tokenize=m(")",true)}else{p.tokenize=c}return g(null,"(")}return{startState:function(p){return{tokenize:c,baseIndent:p||0,stack:[],lastToken:null}},token:function(u,r){r.tokenize=r.tokenize||c;if(r.tokenize==c&&u.eatSpace()){return null}var q=r.tokenize(u,r);if(q&&typeof q!="string"){q=g(q[0],q[1])}var p=r.stack[r.stack.length-1];if(q=="variable"){if(i=="variable-definition"){r.stack.push("propertyValue")}return r.lastToken="variable-2"}else{if(q=="property"){var t=u.current().toLowerCase();if(p=="propertyValue"){if(h.hasOwnProperty(t)){q="string-2"}else{if(l.hasOwnProperty(t)){q="keyword"}else{q="variable-2"}}}else{if(p=="rule"){if(!j.hasOwnProperty(t)){q+=" error"}}else{if(p=="block"){if(j.hasOwnProperty(t)){q="property"}else{if(l.hasOwnProperty(t)){q="keyword"}else{if(h.hasOwnProperty(t)){q="string-2"}else{q="tag"}}}}else{if(!p||p=="@media{"){q="tag"}else{if(p=="@media"){if(n[u.current()]){q="attribute"}else{if(/^(only|not)$/.test(t)){q="keyword"}else{if(t=="and"){q="error"}else{if(k.hasOwnProperty(t)){q="error"}else{q="attribute error"}}}}}else{if(p=="@mediaType"){if(n.hasOwnProperty(t)){q="attribute"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q="error"}}}}else{if(p=="@mediaType("){if(j.hasOwnProperty(t)){}else{if(n.hasOwnProperty(t)){q="error"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q+=" error"}}}}}else{if(p=="@import"){q="tag"}else{q="error"}}}}}}}}}else{if(q=="atom"){if(!p||p=="@media{"||p=="block"){q="builtin"}else{if(p=="propertyValue"){if(!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(u.current())){q+=" error"}}else{q="error"}}}else{if(p=="@media"&&i=="{"){q="error"}}}}if(i=="{"){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@media{"}else{var v=a?"block":"rule";r.stack.push(v)}}else{if(i=="}"){if(p=="interpolation"){q="operator"}while(r.stack.length){var s=r.stack.pop();if(s.indexOf("{")>-1||s=="block"||s=="rule"){break}}}else{if(i=="interpolation"){r.stack.push("interpolation")}else{if(i=="@media"){r.stack.push("@media")}else{if(i=="@import"){r.stack.push("@import")}else{if(p=="@media"&&/\b(keyword|attribute)\b/.test(q)){r.stack[r.stack.length-1]="@mediaType"}else{if(p=="@mediaType"&&u.current()==","){r.stack[r.stack.length-1]="@media"}else{if(i=="("){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@mediaType";r.stack.push("@mediaType(")}else{r.stack.push("(")}}else{if(i==")"){while(r.stack.length){var s=r.stack.pop();if(s.indexOf("(")>-1){break}}}else{if(i==":"&&r.lastToken=="property"){r.stack.push("propertyValue")}else{if(p=="propertyValue"&&i==";"){r.stack.pop()}else{if(p=="@import"&&i==";"){r.stack.pop()}}}}}}}}}}}}return r.lastToken=q},indent:function(q,p){var r=q.stack.length;if(/^\}/.test(p)){r-=q.stack[r-1]=="propertyValue"?2:1}return q.baseIndent+r*e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});(function(){function b(k){var j={};for(var h=0;h=2&&k==">"){m.tokenize=null;break}l=(k=="-")?l+1:0}return["comment","comment"]}if(j.eat("!")){i.tokenize=h;return h(j,i)}},"/":function(i,h){if(i.eat("*")){h.tokenize=a;return a(i,h)}return false}},name:"css"});CodeMirror.defineMIME("text/x-scss",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,allowNested:true,hooks:{":":function(h){if(h.match(/\s*{/)){return[null,"{"]}return false},"$":function(h){h.match(/^[\w-]+/);if(h.peek()==":"){return["variable","variable-definition"]}return["variable","variable"]},",":function(i,h){if(h.stack[h.stack.length-1]=="propertyValue"&&i.match(/^ *\$/,false)){return["operator",";"]}},"/":function(i,h){if(i.eat("/")){i.skipToEnd();return["comment","comment"]}else{if(i.eat("*")){h.tokenize=a;return a(i,h)}else{return["operator","operator"]}}},"#":function(h){if(h.eat("{")){return["operator","interpolation"]}else{h.eatWhile(/[\w\\\-]/);return["atom","hash"]}}},name:"css"})})();CodeMirror.defineMode("htmlmixed",function(b,c){var a=CodeMirror.getMode(b,{name:"xml",htmlMode:true});var m=CodeMirror.getMode(b,"css");var k=[],j=c&&c.scriptTypes;k.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(b,"javascript")});if(j){for(var d=0;d"){var t=s.string.slice(Math.max(0,s.pos-100),s.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);t=t?t[1]:"";if(t&&/[\"\']/.test(t.charAt(0))){t=t.slice(1,t.length-1)}for(var n=0;n"){q.token=f;q.localMode=m;q.localState=m.startState(a.indent(q.htmlState,""))}}return p}function g(r,n,o){var q=r.current();var p=q.search(n),i;if(p>-1){r.backUp(q.length-p)}else{if(i=q.match(/<\/?$/)){r.backUp(q.length);if(!r.match(n,false)){r.match(q)}}}return o}function l(n,i){if(n.match(/^<\/\s*script\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*script\s*>/,i.localMode.token(n,i.localState))}function f(n,i){if(n.match(/^<\/\s*style\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*style\s*>/,m.token(n,i.localState))}return{startState:function(){var i=a.startState();return{token:e,localMode:null,localState:null,htmlState:i}},copyState:function(n){if(n.localState){var i=CodeMirror.copyState(n.localMode,n.localState)}return{token:n.token,localMode:n.localMode,localState:i,htmlState:CodeMirror.copyState(a,n.htmlState)}},token:function(n,i){return i.token(n,i)},indent:function(n,i){if(!n.localMode||/^\s*<\//.test(i)){return a.indent(n.htmlState,i)}else{if(n.localMode.indent){return n.localMode.indent(n.localState,i)}else{return CodeMirror.Pass}}},electricChars:"/{}:",innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||a}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed"); \ No newline at end of file diff --git a/skins/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js b/skins/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js new file mode 100755 index 0000000..5d102a7 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js @@ -0,0 +1 @@ +CodeMirror.defineMode("javascript",function(U,af){var i=U.indentUnit;var v=af.statementIndent;var u=af.json;var e=af.typescript;var al=function(){function aH(aJ){return{type:aJ,style:"keyword"}}var aC=aH("keyword a"),aA=aH("keyword b"),az=aH("keyword c");var aB=aH("operator"),aF={type:"atom",style:"atom"};var aD={"if":aH("if"),"while":aC,"with":aC,"else":aA,"do":aA,"try":aA,"finally":aA,"return":az,"break":az,"continue":az,"new":az,"delete":az,"throw":az,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aB,"typeof":aB,"instanceof":aB,"true":aF,"false":aF,"null":aF,"undefined":aF,"NaN":aF,"Infinity":aF,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:az,"export":aH("export"),"import":aH("import"),"extends":az};if(e){var aI={type:"variable",style:"variable-3"};var aE={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aI,number:aI,bool:aI,any:aI};for(var aG in aE){aD[aG]=aE[aG]}}return aD}();var J=/[+\-*&%=<>!?|~^]/;function ab(aC,az){var aB=false,aA;while((aA=aC.next())!=null){if(aA==az&&!aB){return false}aB=!aB&&aA=="\\"}return aB}var M,A;function F(aB,aA,az){M=aB;A=az;return aA}function O(aD,aB){var az=aD.next();if(az=='"'||az=="'"){aB.tokenize=L(az);return aB.tokenize(aD,aB)}else{if(az=="."&&aD.match(/^\d+(?:[eE][+\-]?\d+)?/)){return F("number","number")}else{if(az=="."&&aD.match("..")){return F("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(az)){return F(az)}else{if(az=="="&&aD.eat(">")){return F("=>")}else{if(az=="0"&&aD.eat(/x/i)){aD.eatWhile(/[\da-f]/i);return F("number","number")}else{if(/\d/.test(az)){aD.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return F("number","number")}else{if(az=="/"){if(aD.eat("*")){aB.tokenize=aq;return aq(aD,aB)}else{if(aD.eat("/")){aD.skipToEnd();return F("comment","comment")}else{if(aB.lastType=="operator"||aB.lastType=="keyword c"||aB.lastType=="sof"||/^[\[{}\(,;:]$/.test(aB.lastType)){ab(aD,"/");aD.eatWhile(/[gimy]/);return F("regexp","string-2")}else{aD.eatWhile(J);return F("operator",null,aD.current())}}}}else{if(az=="`"){aB.tokenize=ar;return ar(aD,aB)}else{if(az=="#"){aD.skipToEnd();return F("error","error")}else{if(J.test(az)){aD.eatWhile(J);return F("operator",null,aD.current())}else{aD.eatWhile(/[\w\$_]/);var aC=aD.current(),aA=al.propertyIsEnumerable(aC)&&al[aC];return(aA&&aB.lastType!=".")?F(aA.type,aA.style,aC):F("variable","variable",aC)}}}}}}}}}}}}function L(az){return function(aB,aA){if(!ab(aB,az)){aA.tokenize=O}return F("string","string")}}function aq(aC,aB){var az=false,aA;while(aA=aC.next()){if(aA=="/"&&az){aB.tokenize=O;break}az=(aA=="*")}return F("comment","comment")}function ar(aC,aA){var aB=false,az;while((az=aC.next())!=null){if(!aB&&(az=="`"||az=="$"&&aC.eat("{"))){aA.tokenize=O;break}aB=!aB&&az=="\\"}return F("quasi","string-2",aC.current())}var j="([{}])";function ao(aF,aC){if(aC.fatArrowAt){aC.fatArrowAt=null}var aB=aF.string.indexOf("=>",aF.start);if(aB<0){return}var aE=0,aA=false;for(var aG=aB-1;aG>=0;--aG){var az=aF.string.charAt(aG);var aD=j.indexOf(az);if(aD>=0&&aD<3){if(!aE){++aG;break}if(--aE==0){break}}else{if(aD>=3&&aD<6){++aE}else{if(/[$\w]/.test(az)){aA=true}else{if(aA&&!aE){++aG;break}}}}}if(aA&&!aE){aC.fatArrowAt=aG}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function D(aE,aA,az,aD,aB,aC){this.indented=aE;this.column=aA;this.type=az;this.prev=aB;this.info=aC;if(aD!=null){this.align=aD}}function n(aC,aB){for(var aA=aC.localVars;aA;aA=aA.next){if(aA.name==aB){return true}}for(var az=aC.context;az;az=az.prev){for(var aA=az.vars;aA;aA=aA.next){if(aA.name==aB){return true}}}}function d(aD,aA,az,aC,aE){var aF=aD.cc;y.state=aD;y.stream=aE;y.marked=null,y.cc=aF;if(!aD.lexical.hasOwnProperty("align")){aD.lexical.align=true}while(true){var aB=aF.length?aF.pop():u?aj:ax;if(aB(az,aC)){while(aF.length&&aF[aF.length-1].lex){aF.pop()()}if(y.marked){return y.marked}if(az=="variable"&&n(aD,aC)){return"variable-2"}return aA}}}var y={state:null,column:null,marked:null,cc:null};function V(){for(var az=arguments.length-1;az>=0;az--){y.cc.push(arguments[az])}}function Z(){V.apply(null,arguments);return true}function an(aA){function az(aD){for(var aC=aD;aC;aC=aC.next){if(aC.name==aA){return true}}return false}var aB=y.state;if(aB.context){y.marked="def";if(az(aB.localVars)){return}aB.localVars={name:aA,next:aB.localVars}}else{if(az(aB.globalVars)){return}if(af.globalVars){aB.globalVars={name:aA,next:aB.globalVars}}}}var l={name:"this",next:{name:"arguments"}};function r(){y.state.context={prev:y.state.context,vars:y.state.localVars};y.state.localVars=l}function s(){y.state.localVars=y.state.context.vars;y.state.context=y.state.context.prev}function av(aA,aB){var az=function(){var aD=y.state,aC=aD.indented;if(aD.lexical.type=="stat"){aC=aD.lexical.indented}aD.lexical=new D(aC,y.stream.column(),aA,null,aD.lexical,aB)};az.lex=true;return az}function f(){var az=y.state;if(az.lexical.prev){if(az.lexical.type==")"){az.indented=az.lexical.indented}az.lexical=az.lexical.prev}}f.lex=true;function m(az){return function(aA){if(aA==az){return Z()}else{if(az==";"){return V()}else{return Z(arguments.callee)}}}}function ax(az,aA){if(az=="var"){return Z(av("vardef",aA.length),b,m(";"),f)}if(az=="keyword a"){return Z(av("form"),aj,ax,f)}if(az=="keyword b"){return Z(av("form"),ax,f)}if(az=="{"){return Z(av("}"),t,f)}if(az==";"){return Z()}if(az=="if"){return Z(av("form"),aj,ax,f,c)}if(az=="function"){return Z(G)}if(az=="for"){return Z(av("form"),p,f,ax,f)}if(az=="variable"){return Z(av("stat"),ay)}if(az=="switch"){return Z(av("form"),aj,av("}","switch"),m("{"),t,f,f)}if(az=="case"){return Z(aj,m(":"))}if(az=="default"){return Z(m(":"))}if(az=="catch"){return Z(av("form"),r,m("("),aa,m(")"),ax,f,s)}if(az=="module"){return Z(av("form"),r,B,s,f)}if(az=="class"){return Z(av("form"),Q,P,f)}if(az=="export"){return Z(av("form"),aw,f)}if(az=="import"){return Z(av("form"),ac,f)}return V(av("stat"),aj,m(";"),f)}function aj(az){return T(az,false)}function au(az){return T(az,true)}function T(aA,aC){if(y.state.fatArrowAt==y.stream.start){var az=aC?H:R;if(aA=="("){return Z(r,am(g,")"),m("=>"),az,s)}else{if(aA=="variable"){return V(r,g,m("=>"),az,s)}}}var aB=aC?h:W;if(a.hasOwnProperty(aA)){return Z(aB)}if(aA=="function"){return Z(G)}if(aA=="keyword c"){return Z(aC?ag:ae)}if(aA=="("){return Z(av(")"),ae,ap,m(")"),f,aB)}if(aA=="operator"||aA=="spread"){return Z(aC?au:aj)}if(aA=="["){return Z(av("]"),au,ai,f,aB)}if(aA=="{"){return Z(am(o,"}"),aB)}return Z()}function ae(az){if(az.match(/[;\}\)\],]/)){return V()}return V(aj)}function ag(az){if(az.match(/[;\}\)\],]/)){return V()}return V(au)}function W(az,aA){if(az==","){return Z(aj)}return h(az,aA,false)}function h(az,aB,aD){var aA=aD==false?W:h;var aC=aD==false?aj:au;if(aB=="=>"){return Z(r,aD?H:R,s)}if(az=="operator"){if(/\+\+|--/.test(aB)){return Z(aA)}if(aB=="?"){return Z(aj,m(":"),aC)}return Z(aC)}if(az=="quasi"){y.cc.push(aA);return K(aB)}if(az==";"){return}if(az=="("){return Z(am(au,")","call"),aA)}if(az=="."){return Z(ah,aA)}if(az=="["){return Z(av("]"),ae,m("]"),f,aA)}}function K(az){if(!az){}if(az.slice(az.length-2)!="${"){return Z()}return Z(aj,k)}function k(az){if(az=="}"){y.marked="string-2";y.state.tokenize=ar;return Z()}}function R(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(aj)}function H(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(au)}function ay(az){if(az==":"){return Z(f,ax)}return V(W,m(";"),f)}function ah(az){if(az=="variable"){y.marked="property";return Z()}}function o(az,aA){if(az=="variable"){y.marked="property";if(aA=="get"||aA=="set"){return Z(C)}}else{if(az=="number"||az=="string"){y.marked=az+" property"}else{if(az=="["){return Z(aj,m("]"),E)}}}if(a.hasOwnProperty(az)){return Z(E)}}function C(az){if(az!="variable"){return V(E)}y.marked="property";return Z(G)}function E(az){if(az==":"){return Z(au)}if(az=="("){return V(G)}}function am(aC,az,aB){function aA(aE){if(aE==","){var aD=y.state.lexical;if(aD.info=="call"){aD.pos=(aD.pos||0)+1}return Z(aC,aA)}if(aE==az){return Z()}return Z(m(az))}return function(aD){if(aD==az){return Z()}if(aB===false){return V(aC,aA)}return V(av(az,aB),aC,aA,f)}}function t(az){if(az=="}"){return Z()}return V(ax,t)}function N(az){if(e&&az==":"){return Z(Y)}}function Y(az){if(az=="variable"){y.marked="variable-3";return Z()}}function b(){return V(g,N,X,S)}function g(az,aA){if(az=="variable"){an(aA);return Z()}if(az=="["){return Z(am(g,"]"))}if(az=="{"){return Z(am(at,"}"))}}function at(az,aA){if(az=="variable"&&!y.stream.match(/^\s*:/,false)){an(aA);return Z(X)}if(az=="variable"){y.marked="property"}return Z(m(":"),g,X)}function X(az,aA){if(aA=="="){return Z(au)}}function S(az){if(az==","){return Z(b)}}function c(az,aA){if(az=="keyword b"&&aA=="else"){return Z(av("form"),ax,f)}}function p(az){if(az=="("){return Z(av(")"),z,m(")"))}}function z(az){if(az=="var"){return Z(b,m(";"),x)}if(az==";"){return Z(x)}if(az=="variable"){return Z(q)}return V(aj,m(";"),x)}function q(az,aA){if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return Z(W,x)}function x(az,aA){if(az==";"){return Z(w)}if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return V(aj,m(";"),w)}function w(az){if(az!=")"){Z(aj)}}function G(az,aA){if(aA=="*"){y.marked="keyword";return Z(G)}if(az=="variable"){an(aA);return Z(G)}if(az=="("){return Z(r,am(aa,")"),ax,s)}}function aa(az){if(az=="spread"){return Z(aa)}return V(g,N)}function Q(az,aA){if(az=="variable"){an(aA);return Z(I)}}function I(az,aA){if(aA=="extends"){return Z(aj)}}function P(az){if(az=="{"){return Z(am(o,"}"))}}function B(az,aA){if(az=="string"){return Z(ax)}if(az=="variable"){an(aA);return Z(ad)}}function aw(az,aA){if(aA=="*"){y.marked="keyword";return Z(ad,m(";"))}if(aA=="default"){y.marked="keyword";return Z(aj,m(";"))}return V(ax)}function ac(az){if(az=="string"){return Z()}return V(ak,ad)}function ak(az,aA){if(az=="{"){return Z(am(ak,"}"))}if(az=="variable"){an(aA)}return Z()}function ad(az,aA){if(aA=="from"){y.marked="keyword";return Z(aj)}}function ai(az){if(az=="for"){return V(ap)}if(az==","){return Z(am(au,"]",false))}return V(am(au,"]",false))}function ap(az){if(az=="for"){return Z(p,ap)}if(az=="if"){return Z(aj,ap)}}return{startState:function(aA){var az={tokenize:O,lastType:"sof",cc:[],lexical:new D((aA||0)-i,0,"block",false),localVars:af.localVars,context:af.localVars&&{vars:af.localVars},indented:0};if(af.globalVars){az.globalVars=af.globalVars}return az},token:function(aB,aA){if(aB.sol()){if(!aA.lexical.hasOwnProperty("align")){aA.lexical.align=false}aA.indented=aB.indentation();ao(aB,aA)}if(aA.tokenize!=aq&&aB.eatSpace()){return null}var az=aA.tokenize(aB,aA);if(M=="comment"){return az}aA.lastType=M=="operator"&&(A=="++"||A=="--")?"incdec":M;return d(aA,az,M,A,aB)},indent:function(aF,az){if(aF.tokenize==aq){return CodeMirror.Pass}if(aF.tokenize!=O){return 0}var aE=az&&az.charAt(0),aC=aF.lexical;for(var aB=aF.cc.length-1;aB>=0;--aB){var aG=aF.cc[aB];if(aG==f){aC=aC.prev}else{if(aG!=c){break}}}if(aC.type=="stat"&&aE=="}"){aC=aC.prev}if(v&&aC.type==")"&&aC.prev.type=="stat"){aC=aC.prev}var aD=aC.type,aA=aE==aD;if(aD=="vardef"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?aC.info+1:0)}else{if(aD=="form"&&aE=="{"){return aC.indented}else{if(aD=="form"){return aC.indented+i}else{if(aD=="stat"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?v||i:0)}else{if(aC.info=="switch"&&!aA&&af.doubleIndentSwitch!=false){return aC.indented+(/^(?:case|default)\b/.test(az)?i:2*i)}else{if(aC.align){return aC.column+(aA?0:1)}else{return aC.indented+(aA?0:i)}}}}}}},electricChars:":{}",blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",lineComment:u?null:"//",fold:"brace",helperType:u?"json":"javascript",jsonMode:u}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true}); \ No newline at end of file diff --git a/skins/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js b/skins/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js new file mode 100755 index 0000000..5bcc3ac --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js @@ -0,0 +1 @@ +CodeMirror.defineMode("htmlmixed",function(b,c){var a=CodeMirror.getMode(b,{name:"xml",htmlMode:true});var m=CodeMirror.getMode(b,"css");var k=[],j=c&&c.scriptTypes;k.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(b,"javascript")});if(j){for(var d=0;d"){var t=s.string.slice(Math.max(0,s.pos-100),s.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);t=t?t[1]:"";if(t&&/[\"\']/.test(t.charAt(0))){t=t.slice(1,t.length-1)}for(var n=0;n"){q.token=f;q.localMode=m;q.localState=m.startState(a.indent(q.htmlState,""))}}return p}function g(r,n,o){var q=r.current();var p=q.search(n),i;if(p>-1){r.backUp(q.length-p)}else{if(i=q.match(/<\/?$/)){r.backUp(q.length);if(!r.match(n,false)){r.match(q)}}}return o}function l(n,i){if(n.match(/^<\/\s*script\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*script\s*>/,i.localMode.token(n,i.localState))}function f(n,i){if(n.match(/^<\/\s*style\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*style\s*>/,m.token(n,i.localState))}return{startState:function(){var i=a.startState();return{token:e,localMode:null,localState:null,htmlState:i}},copyState:function(n){if(n.localState){var i=CodeMirror.copyState(n.localMode,n.localState)}return{token:n.token,localMode:n.localMode,localState:i,htmlState:CodeMirror.copyState(a,n.htmlState)}},token:function(n,i){return i.token(n,i)},indent:function(n,i){if(!n.localMode||/^\s*<\//.test(i)){return a.indent(n.htmlState,i)}else{if(n.localMode.indent){return n.localMode.indent(n.localState,i)}else{return CodeMirror.Pass}}},electricChars:"/{}:",innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||a}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");CodeMirror.defineMode("xml",function(B,l){var s=B.indentUnit;var A=l.multilineTagIndentFactor||1;var c=l.multilineTagIndentPastTag||true;var y=l.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var b=l.alignCDATA;var g,h;function p(I,H){function F(K){H.tokenize=K;return K(I,H)}var G=I.next();if(G=="<"){if(I.eat("!")){if(I.eat("[")){if(I.match("CDATA[")){return F(x("atom","]]>"))}else{return null}}else{if(I.match("--")){return F(x("comment","-->"))}else{if(I.match("DOCTYPE",true,true)){I.eatWhile(/[\w\._\-]/);return F(C(1))}else{return null}}}}else{if(I.eat("?")){I.eatWhile(/[\w\._\-]/);H.tokenize=x("meta","?>");return"meta"}else{var D=I.eat("/");g="";var J;while((J=I.eat(/[^\s\u00a0=<>\"\'\/?]/))){g+=J}if(!g){return"tag error"}h=D?"closeTag":"openTag";H.tokenize=o;return"tag"}}}else{if(G=="&"){var E;if(I.eat("#")){if(I.eat("x")){E=I.eatWhile(/[a-fA-F\d]/)&&I.eat(";")}else{E=I.eatWhile(/[\d]/)&&I.eat(";")}}else{E=I.eatWhile(/[\w\.\-:]/)&&I.eat(";")}return E?"atom":"error"}else{I.eatWhile(/[^&<]/);return null}}}function o(G,F){var E=G.next();if(E==">"||(E=="/"&&G.eat(">"))){F.tokenize=p;h=E==">"?"endTag":"selfcloseTag";return"tag"}else{if(E=="="){h="equals";return null}else{if(E=="<"){F.tokenize=p;var D=F.tokenize(G,F);return D?D+" error":"error"}else{if(/[\'\"]/.test(E)){F.tokenize=k(E);F.stringStartCol=G.column();return F.tokenize(G,F)}else{G.eatWhile(/[^\s\u00a0=<>\"\']/);return"word"}}}}}function k(D){var E=function(G,F){while(!G.eol()){if(G.next()==D){F.tokenize=o;break}}return"string"};E.isInAttribute=true;return E}function x(E,D){return function(G,F){while(!G.eol()){if(G.match(D)){F.tokenize=p;break}G.next()}return E}}function C(D){return function(G,F){var E;while((E=G.next())!=null){if(E=="<"){F.tokenize=C(D+1);return F.tokenize(G,F)}else{if(E==">"){if(D==1){F.tokenize=p;break}else{F.tokenize=C(D-1);return F.tokenize(G,F)}}}}return"meta"}}var m,z,i;function a(){for(var D=arguments.length-1;D>=0;D--){m.cc.push(arguments[D])}}function f(){a.apply(null,arguments);return true}function j(D,F){var E=y.doNotIndent.hasOwnProperty(D)||(m.context&&m.context.noIndent);m.context={prev:m.context,tagName:D,indent:m.indented,startOfLine:F,noIndent:E}}function v(){if(m.context){m.context=m.context.prev}}function e(D){if(D=="openTag"){m.tagName=g;m.tagStart=z.column();return f(n,d(m.startOfLine))}else{if(D=="closeTag"){var E=false;if(m.context){if(m.context.tagName!=g){if(y.implicitlyClosed.hasOwnProperty(m.context.tagName.toLowerCase())){v()}E=!m.context||m.context.tagName!=g}}else{E=true}if(E){i="error"}return f(t(E))}}return f()}function d(D){return function(F){var E=m.tagName;m.tagName=m.tagStart=null;if(F=="selfcloseTag"||(F=="endTag"&&y.autoSelfClosers.hasOwnProperty(E.toLowerCase()))){r(E.toLowerCase());return f()}if(F=="endTag"){r(E.toLowerCase());j(E,D);return f()}return f()}}function t(D){return function(E){if(D){i="error"}if(E=="endTag"){v();return f()}i="error";return f(arguments.callee)}}function r(E){var D;while(true){if(!m.context){return}D=m.context.tagName.toLowerCase();if(!y.contextGrabbers.hasOwnProperty(D)||!y.contextGrabbers[D].hasOwnProperty(E)){return}v()}}function n(D){if(D=="word"){i="attribute";return f(q,n)}if(D=="endTag"||D=="selfcloseTag"){return a()}i="error";return f(n)}function q(D){if(D=="equals"){return f(w,n)}if(!y.allowMissing){i="error"}else{if(D=="word"){i="attribute";return f(q,n)}}return(D=="endTag"||D=="selfcloseTag")?a():f()}function w(D){if(D=="string"){return f(u)}if(D=="word"&&y.allowUnquoted){i="string";return f()}i="error";return(D=="endTag"||D=="selfCloseTag")?a():f()}function u(D){if(D=="string"){return f(u)}else{return a()}}return{startState:function(){return{tokenize:p,cc:[],indented:0,startOfLine:true,tagName:null,tagStart:null,context:null}},token:function(G,F){if(!F.tagName&&G.sol()){F.startOfLine=true;F.indented=G.indentation()}if(G.eatSpace()){return null}i=h=g=null;var E=F.tokenize(G,F);F.type=h;if((E||h)&&E!="comment"){m=F;z=G;while(true){var D=F.cc.pop()||e;if(D(h||E)){break}}}F.startOfLine=false;if(i){E=i=="error"?E+" error":i}return E},indent:function(G,D,F){var E=G.context;if(G.tokenize.isInAttribute){return G.stringStartCol+1}if((G.tokenize!=o&&G.tokenize!=p)||E&&E.noIndent){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(c){return G.tagStart+G.tagName.length+2}else{return G.tagStart+s*A}}if(b&&/",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("javascript",function(U,af){var i=U.indentUnit;var v=af.statementIndent;var u=af.json;var e=af.typescript;var al=function(){function aH(aJ){return{type:aJ,style:"keyword"}}var aC=aH("keyword a"),aA=aH("keyword b"),az=aH("keyword c");var aB=aH("operator"),aF={type:"atom",style:"atom"};var aD={"if":aH("if"),"while":aC,"with":aC,"else":aA,"do":aA,"try":aA,"finally":aA,"return":az,"break":az,"continue":az,"new":az,"delete":az,"throw":az,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aB,"typeof":aB,"instanceof":aB,"true":aF,"false":aF,"null":aF,"undefined":aF,"NaN":aF,"Infinity":aF,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:az,"export":aH("export"),"import":aH("import"),"extends":az};if(e){var aI={type:"variable",style:"variable-3"};var aE={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aI,number:aI,bool:aI,any:aI};for(var aG in aE){aD[aG]=aE[aG]}}return aD}();var J=/[+\-*&%=<>!?|~^]/;function ab(aC,az){var aB=false,aA;while((aA=aC.next())!=null){if(aA==az&&!aB){return false}aB=!aB&&aA=="\\"}return aB}var M,A;function F(aB,aA,az){M=aB;A=az;return aA}function O(aD,aB){var az=aD.next();if(az=='"'||az=="'"){aB.tokenize=L(az);return aB.tokenize(aD,aB)}else{if(az=="."&&aD.match(/^\d+(?:[eE][+\-]?\d+)?/)){return F("number","number")}else{if(az=="."&&aD.match("..")){return F("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(az)){return F(az)}else{if(az=="="&&aD.eat(">")){return F("=>")}else{if(az=="0"&&aD.eat(/x/i)){aD.eatWhile(/[\da-f]/i);return F("number","number")}else{if(/\d/.test(az)){aD.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return F("number","number")}else{if(az=="/"){if(aD.eat("*")){aB.tokenize=aq;return aq(aD,aB)}else{if(aD.eat("/")){aD.skipToEnd();return F("comment","comment")}else{if(aB.lastType=="operator"||aB.lastType=="keyword c"||aB.lastType=="sof"||/^[\[{}\(,;:]$/.test(aB.lastType)){ab(aD,"/");aD.eatWhile(/[gimy]/);return F("regexp","string-2")}else{aD.eatWhile(J);return F("operator",null,aD.current())}}}}else{if(az=="`"){aB.tokenize=ar;return ar(aD,aB)}else{if(az=="#"){aD.skipToEnd();return F("error","error")}else{if(J.test(az)){aD.eatWhile(J);return F("operator",null,aD.current())}else{aD.eatWhile(/[\w\$_]/);var aC=aD.current(),aA=al.propertyIsEnumerable(aC)&&al[aC];return(aA&&aB.lastType!=".")?F(aA.type,aA.style,aC):F("variable","variable",aC)}}}}}}}}}}}}function L(az){return function(aB,aA){if(!ab(aB,az)){aA.tokenize=O}return F("string","string")}}function aq(aC,aB){var az=false,aA;while(aA=aC.next()){if(aA=="/"&&az){aB.tokenize=O;break}az=(aA=="*")}return F("comment","comment")}function ar(aC,aA){var aB=false,az;while((az=aC.next())!=null){if(!aB&&(az=="`"||az=="$"&&aC.eat("{"))){aA.tokenize=O;break}aB=!aB&&az=="\\"}return F("quasi","string-2",aC.current())}var j="([{}])";function ao(aF,aC){if(aC.fatArrowAt){aC.fatArrowAt=null}var aB=aF.string.indexOf("=>",aF.start);if(aB<0){return}var aE=0,aA=false;for(var aG=aB-1;aG>=0;--aG){var az=aF.string.charAt(aG);var aD=j.indexOf(az);if(aD>=0&&aD<3){if(!aE){++aG;break}if(--aE==0){break}}else{if(aD>=3&&aD<6){++aE}else{if(/[$\w]/.test(az)){aA=true}else{if(aA&&!aE){++aG;break}}}}}if(aA&&!aE){aC.fatArrowAt=aG}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function D(aE,aA,az,aD,aB,aC){this.indented=aE;this.column=aA;this.type=az;this.prev=aB;this.info=aC;if(aD!=null){this.align=aD}}function n(aC,aB){for(var aA=aC.localVars;aA;aA=aA.next){if(aA.name==aB){return true}}for(var az=aC.context;az;az=az.prev){for(var aA=az.vars;aA;aA=aA.next){if(aA.name==aB){return true}}}}function d(aD,aA,az,aC,aE){var aF=aD.cc;y.state=aD;y.stream=aE;y.marked=null,y.cc=aF;if(!aD.lexical.hasOwnProperty("align")){aD.lexical.align=true}while(true){var aB=aF.length?aF.pop():u?aj:ax;if(aB(az,aC)){while(aF.length&&aF[aF.length-1].lex){aF.pop()()}if(y.marked){return y.marked}if(az=="variable"&&n(aD,aC)){return"variable-2"}return aA}}}var y={state:null,column:null,marked:null,cc:null};function V(){for(var az=arguments.length-1;az>=0;az--){y.cc.push(arguments[az])}}function Z(){V.apply(null,arguments);return true}function an(aA){function az(aD){for(var aC=aD;aC;aC=aC.next){if(aC.name==aA){return true}}return false}var aB=y.state;if(aB.context){y.marked="def";if(az(aB.localVars)){return}aB.localVars={name:aA,next:aB.localVars}}else{if(az(aB.globalVars)){return}if(af.globalVars){aB.globalVars={name:aA,next:aB.globalVars}}}}var l={name:"this",next:{name:"arguments"}};function r(){y.state.context={prev:y.state.context,vars:y.state.localVars};y.state.localVars=l}function s(){y.state.localVars=y.state.context.vars;y.state.context=y.state.context.prev}function av(aA,aB){var az=function(){var aD=y.state,aC=aD.indented;if(aD.lexical.type=="stat"){aC=aD.lexical.indented}aD.lexical=new D(aC,y.stream.column(),aA,null,aD.lexical,aB)};az.lex=true;return az}function f(){var az=y.state;if(az.lexical.prev){if(az.lexical.type==")"){az.indented=az.lexical.indented}az.lexical=az.lexical.prev}}f.lex=true;function m(az){return function(aA){if(aA==az){return Z()}else{if(az==";"){return V()}else{return Z(arguments.callee)}}}}function ax(az,aA){if(az=="var"){return Z(av("vardef",aA.length),b,m(";"),f)}if(az=="keyword a"){return Z(av("form"),aj,ax,f)}if(az=="keyword b"){return Z(av("form"),ax,f)}if(az=="{"){return Z(av("}"),t,f)}if(az==";"){return Z()}if(az=="if"){return Z(av("form"),aj,ax,f,c)}if(az=="function"){return Z(G)}if(az=="for"){return Z(av("form"),p,f,ax,f)}if(az=="variable"){return Z(av("stat"),ay)}if(az=="switch"){return Z(av("form"),aj,av("}","switch"),m("{"),t,f,f)}if(az=="case"){return Z(aj,m(":"))}if(az=="default"){return Z(m(":"))}if(az=="catch"){return Z(av("form"),r,m("("),aa,m(")"),ax,f,s)}if(az=="module"){return Z(av("form"),r,B,s,f)}if(az=="class"){return Z(av("form"),Q,P,f)}if(az=="export"){return Z(av("form"),aw,f)}if(az=="import"){return Z(av("form"),ac,f)}return V(av("stat"),aj,m(";"),f)}function aj(az){return T(az,false)}function au(az){return T(az,true)}function T(aA,aC){if(y.state.fatArrowAt==y.stream.start){var az=aC?H:R;if(aA=="("){return Z(r,am(g,")"),m("=>"),az,s)}else{if(aA=="variable"){return V(r,g,m("=>"),az,s)}}}var aB=aC?h:W;if(a.hasOwnProperty(aA)){return Z(aB)}if(aA=="function"){return Z(G)}if(aA=="keyword c"){return Z(aC?ag:ae)}if(aA=="("){return Z(av(")"),ae,ap,m(")"),f,aB)}if(aA=="operator"||aA=="spread"){return Z(aC?au:aj)}if(aA=="["){return Z(av("]"),au,ai,f,aB)}if(aA=="{"){return Z(am(o,"}"),aB)}return Z()}function ae(az){if(az.match(/[;\}\)\],]/)){return V()}return V(aj)}function ag(az){if(az.match(/[;\}\)\],]/)){return V()}return V(au)}function W(az,aA){if(az==","){return Z(aj)}return h(az,aA,false)}function h(az,aB,aD){var aA=aD==false?W:h;var aC=aD==false?aj:au;if(aB=="=>"){return Z(r,aD?H:R,s)}if(az=="operator"){if(/\+\+|--/.test(aB)){return Z(aA)}if(aB=="?"){return Z(aj,m(":"),aC)}return Z(aC)}if(az=="quasi"){y.cc.push(aA);return K(aB)}if(az==";"){return}if(az=="("){return Z(am(au,")","call"),aA)}if(az=="."){return Z(ah,aA)}if(az=="["){return Z(av("]"),ae,m("]"),f,aA)}}function K(az){if(!az){}if(az.slice(az.length-2)!="${"){return Z()}return Z(aj,k)}function k(az){if(az=="}"){y.marked="string-2";y.state.tokenize=ar;return Z()}}function R(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(aj)}function H(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(au)}function ay(az){if(az==":"){return Z(f,ax)}return V(W,m(";"),f)}function ah(az){if(az=="variable"){y.marked="property";return Z()}}function o(az,aA){if(az=="variable"){y.marked="property";if(aA=="get"||aA=="set"){return Z(C)}}else{if(az=="number"||az=="string"){y.marked=az+" property"}else{if(az=="["){return Z(aj,m("]"),E)}}}if(a.hasOwnProperty(az)){return Z(E)}}function C(az){if(az!="variable"){return V(E)}y.marked="property";return Z(G)}function E(az){if(az==":"){return Z(au)}if(az=="("){return V(G)}}function am(aC,az,aB){function aA(aE){if(aE==","){var aD=y.state.lexical;if(aD.info=="call"){aD.pos=(aD.pos||0)+1}return Z(aC,aA)}if(aE==az){return Z()}return Z(m(az))}return function(aD){if(aD==az){return Z()}if(aB===false){return V(aC,aA)}return V(av(az,aB),aC,aA,f)}}function t(az){if(az=="}"){return Z()}return V(ax,t)}function N(az){if(e&&az==":"){return Z(Y)}}function Y(az){if(az=="variable"){y.marked="variable-3";return Z()}}function b(){return V(g,N,X,S)}function g(az,aA){if(az=="variable"){an(aA);return Z()}if(az=="["){return Z(am(g,"]"))}if(az=="{"){return Z(am(at,"}"))}}function at(az,aA){if(az=="variable"&&!y.stream.match(/^\s*:/,false)){an(aA);return Z(X)}if(az=="variable"){y.marked="property"}return Z(m(":"),g,X)}function X(az,aA){if(aA=="="){return Z(au)}}function S(az){if(az==","){return Z(b)}}function c(az,aA){if(az=="keyword b"&&aA=="else"){return Z(av("form"),ax,f)}}function p(az){if(az=="("){return Z(av(")"),z,m(")"))}}function z(az){if(az=="var"){return Z(b,m(";"),x)}if(az==";"){return Z(x)}if(az=="variable"){return Z(q)}return V(aj,m(";"),x)}function q(az,aA){if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return Z(W,x)}function x(az,aA){if(az==";"){return Z(w)}if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return V(aj,m(";"),w)}function w(az){if(az!=")"){Z(aj)}}function G(az,aA){if(aA=="*"){y.marked="keyword";return Z(G)}if(az=="variable"){an(aA);return Z(G)}if(az=="("){return Z(r,am(aa,")"),ax,s)}}function aa(az){if(az=="spread"){return Z(aa)}return V(g,N)}function Q(az,aA){if(az=="variable"){an(aA);return Z(I)}}function I(az,aA){if(aA=="extends"){return Z(aj)}}function P(az){if(az=="{"){return Z(am(o,"}"))}}function B(az,aA){if(az=="string"){return Z(ax)}if(az=="variable"){an(aA);return Z(ad)}}function aw(az,aA){if(aA=="*"){y.marked="keyword";return Z(ad,m(";"))}if(aA=="default"){y.marked="keyword";return Z(aj,m(";"))}return V(ax)}function ac(az){if(az=="string"){return Z()}return V(ak,ad)}function ak(az,aA){if(az=="{"){return Z(am(ak,"}"))}if(az=="variable"){an(aA)}return Z()}function ad(az,aA){if(aA=="from"){y.marked="keyword";return Z(aj)}}function ai(az){if(az=="for"){return V(ap)}if(az==","){return Z(am(au,"]",false))}return V(am(au,"]",false))}function ap(az){if(az=="for"){return Z(p,ap)}if(az=="if"){return Z(aj,ap)}}return{startState:function(aA){var az={tokenize:O,lastType:"sof",cc:[],lexical:new D((aA||0)-i,0,"block",false),localVars:af.localVars,context:af.localVars&&{vars:af.localVars},indented:0};if(af.globalVars){az.globalVars=af.globalVars}return az},token:function(aB,aA){if(aB.sol()){if(!aA.lexical.hasOwnProperty("align")){aA.lexical.align=false}aA.indented=aB.indentation();ao(aB,aA)}if(aA.tokenize!=aq&&aB.eatSpace()){return null}var az=aA.tokenize(aB,aA);if(M=="comment"){return az}aA.lastType=M=="operator"&&(A=="++"||A=="--")?"incdec":M;return d(aA,az,M,A,aB)},indent:function(aF,az){if(aF.tokenize==aq){return CodeMirror.Pass}if(aF.tokenize!=O){return 0}var aE=az&&az.charAt(0),aC=aF.lexical;for(var aB=aF.cc.length-1;aB>=0;--aB){var aG=aF.cc[aB];if(aG==f){aC=aC.prev}else{if(aG!=c){break}}}if(aC.type=="stat"&&aE=="}"){aC=aC.prev}if(v&&aC.type==")"&&aC.prev.type=="stat"){aC=aC.prev}var aD=aC.type,aA=aE==aD;if(aD=="vardef"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?aC.info+1:0)}else{if(aD=="form"&&aE=="{"){return aC.indented}else{if(aD=="form"){return aC.indented+i}else{if(aD=="stat"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?v||i:0)}else{if(aC.info=="switch"&&!aA&&af.doubleIndentSwitch!=false){return aC.indented+(/^(?:case|default)\b/.test(az)?i:2*i)}else{if(aC.align){return aC.column+(aA?0:1)}else{return aC.indented+(aA?0:i)}}}}}}},electricChars:":{}",blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",lineComment:u?null:"//",fold:"brace",helperType:u?"json":"javascript",jsonMode:u}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});CodeMirror.defineMode("css",function(b,d){if(!d.propertyKeywords){d=CodeMirror.resolveMode("text/css")}var e=b.indentUnit||b.tabSize||2,o=d.hooks||{},n=d.atMediaTypes||{},k=d.atMediaFeatures||{},j=d.propertyKeywords||{},l=d.colorKeywords||{},h=d.valueKeywords||{},a=!!d.allowNested,i=null;function g(p,q){i=q;return p}function c(s,r){var q=s.next();if(o[q]){var p=o[q](s,r);if(p!==false){return p}}if(q=="@"){s.eatWhile(/[\w\\\-]/);return g("def",s.current())}else{if(q=="="){g(null,"compare")}else{if((q=="~"||q=="|")&&s.eat("=")){return g(null,"compare")}else{if(q=='"'||q=="'"){r.tokenize=m(q);return r.tokenize(s,r)}else{if(q=="#"){s.eatWhile(/[\w\\\-]/);return g("atom","hash")}else{if(q=="!"){s.match(/^\s*\w*/);return g("keyword","important")}else{if(/\d/.test(q)||q=="."&&s.eat(/\d/)){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(q==="-"){if(/\d/.test(s.peek())){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(s.match(/^[^-]+-/)){return g("meta","meta")}}}else{if(/[,+>*\/]/.test(q)){return g(null,"select-op")}else{if(q=="."&&s.match(/^-?[_a-z][_a-z0-9-]*/i)){return g("qualifier","qualifier")}else{if(q==":"){return g("operator",q)}else{if(/[;{}\[\]\(\)]/.test(q)){return g(null,q)}else{if(q=="u"&&s.match("rl(")){s.backUp(1);r.tokenize=f;return g("property","variable")}else{s.eatWhile(/[\w\\\-]/);return g("property","variable")}}}}}}}}}}}}}}function m(p,q){return function(u,s){var t=false,r;while((r=u.next())!=null){if(r==p&&!t){break}t=!t&&r=="\\"}if(!t){if(q){u.backUp(1)}s.tokenize=c}return g("string","string")}}function f(q,p){q.next();if(!q.match(/\s*[\"\']/,false)){p.tokenize=m(")",true)}else{p.tokenize=c}return g(null,"(")}return{startState:function(p){return{tokenize:c,baseIndent:p||0,stack:[],lastToken:null}},token:function(u,r){r.tokenize=r.tokenize||c;if(r.tokenize==c&&u.eatSpace()){return null}var q=r.tokenize(u,r);if(q&&typeof q!="string"){q=g(q[0],q[1])}var p=r.stack[r.stack.length-1];if(q=="variable"){if(i=="variable-definition"){r.stack.push("propertyValue")}return r.lastToken="variable-2"}else{if(q=="property"){var t=u.current().toLowerCase();if(p=="propertyValue"){if(h.hasOwnProperty(t)){q="string-2"}else{if(l.hasOwnProperty(t)){q="keyword"}else{q="variable-2"}}}else{if(p=="rule"){if(!j.hasOwnProperty(t)){q+=" error"}}else{if(p=="block"){if(j.hasOwnProperty(t)){q="property"}else{if(l.hasOwnProperty(t)){q="keyword"}else{if(h.hasOwnProperty(t)){q="string-2"}else{q="tag"}}}}else{if(!p||p=="@media{"){q="tag"}else{if(p=="@media"){if(n[u.current()]){q="attribute"}else{if(/^(only|not)$/.test(t)){q="keyword"}else{if(t=="and"){q="error"}else{if(k.hasOwnProperty(t)){q="error"}else{q="attribute error"}}}}}else{if(p=="@mediaType"){if(n.hasOwnProperty(t)){q="attribute"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q="error"}}}}else{if(p=="@mediaType("){if(j.hasOwnProperty(t)){}else{if(n.hasOwnProperty(t)){q="error"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q+=" error"}}}}}else{if(p=="@import"){q="tag"}else{q="error"}}}}}}}}}else{if(q=="atom"){if(!p||p=="@media{"||p=="block"){q="builtin"}else{if(p=="propertyValue"){if(!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(u.current())){q+=" error"}}else{q="error"}}}else{if(p=="@media"&&i=="{"){q="error"}}}}if(i=="{"){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@media{"}else{var v=a?"block":"rule";r.stack.push(v)}}else{if(i=="}"){if(p=="interpolation"){q="operator"}while(r.stack.length){var s=r.stack.pop();if(s.indexOf("{")>-1||s=="block"||s=="rule"){break}}}else{if(i=="interpolation"){r.stack.push("interpolation")}else{if(i=="@media"){r.stack.push("@media")}else{if(i=="@import"){r.stack.push("@import")}else{if(p=="@media"&&/\b(keyword|attribute)\b/.test(q)){r.stack[r.stack.length-1]="@mediaType"}else{if(p=="@mediaType"&&u.current()==","){r.stack[r.stack.length-1]="@media"}else{if(i=="("){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@mediaType";r.stack.push("@mediaType(")}else{r.stack.push("(")}}else{if(i==")"){while(r.stack.length){var s=r.stack.pop();if(s.indexOf("(")>-1){break}}}else{if(i==":"&&r.lastToken=="property"){r.stack.push("propertyValue")}else{if(p=="propertyValue"&&i==";"){r.stack.pop()}else{if(p=="@import"&&i==";"){r.stack.pop()}}}}}}}}}}}}return r.lastToken=q},indent:function(q,p){var r=q.stack.length;if(/^\}/.test(p)){r-=q.stack[r-1]=="propertyValue"?2:1}return q.baseIndent+r*e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});(function(){function b(k){var j={};for(var h=0;h=2&&k==">"){m.tokenize=null;break}l=(k=="-")?l+1:0}return["comment","comment"]}if(j.eat("!")){i.tokenize=h;return h(j,i)}},"/":function(i,h){if(i.eat("*")){h.tokenize=a;return a(i,h)}return false}},name:"css"});CodeMirror.defineMIME("text/x-scss",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,allowNested:true,hooks:{":":function(h){if(h.match(/\s*{/)){return[null,"{"]}return false},"$":function(h){h.match(/^[\w-]+/);if(h.peek()==":"){return["variable","variable-definition"]}return["variable","variable"]},",":function(i,h){if(h.stack[h.stack.length-1]=="propertyValue"&&i.match(/^ *\$/,false)){return["operator",";"]}},"/":function(i,h){if(i.eat("/")){i.skipToEnd();return["comment","comment"]}else{if(i.eat("*")){h.tokenize=a;return a(i,h)}else{return["operator","operator"]}}},"#":function(h){if(h.eat("{")){return["operator","interpolation"]}else{h.eatWhile(/[\w\\\-]/);return["atom","hash"]}}},name:"css"})})();CodeMirror.defineMode("clike",function(q,d){var k=q.indentUnit,i=d.statementIndentUnit||k,l=d.dontAlignCalls,f=d.keywords||{},r=d.builtin||{},m=d.blockKeywords||{},b=d.atoms||{},a=d.hooks||{},h=d.multiLineStrings;var g=/[+\-*&%=<>!?|\/]/;var o;function s(x,v){var u=x.next();if(a[u]){var t=a[u](x,v);if(t!==false){return t}}if(u=='"'||u=="'"){v.tokenize=e(u);return v.tokenize(x,v)}if(/[\[\]{}\(\),;\:\.]/.test(u)){o=u;return null}if(/\d/.test(u)){x.eatWhile(/[\w\.]/);return"number"}if(u=="/"){if(x.eat("*")){v.tokenize=j;return j(x,v)}if(x.eat("/")){x.skipToEnd();return"comment"}}if(g.test(u)){x.eatWhile(g);return"operator"}x.eatWhile(/[\w\$_]/);var w=x.current();if(f.propertyIsEnumerable(w)){if(m.propertyIsEnumerable(w)){o="newstatement"}return"keyword"}if(r.propertyIsEnumerable(w)){if(m.propertyIsEnumerable(w)){o="newstatement"}return"builtin"}if(b.propertyIsEnumerable(w)){return"atom"}return"variable"}function e(t){return function(y,w){var x=false,v,u=false;while((v=y.next())!=null){if(v==t&&!x){u=true;break}x=!x&&v=="\\"}if(u||!(x||h)){w.tokenize=null}return"string"}}function j(w,v){var t=false,u;while(u=w.next()){if(u=="/"&&t){v.tokenize=null;break}t=(u=="*")}return"comment"}function n(x,u,t,w,v){this.indented=x;this.column=u;this.type=t;this.align=w;this.prev=v}function c(w,u,v){var t=w.indented;if(w.context&&w.context.type=="statement"){t=w.context.indented}return w.context=new n(t,u,v,null,w.context)}function p(v){var u=v.context.type;if(u==")"||u=="]"||u=="}"){v.indented=v.context.indented}return v.context=v.context.prev}return{startState:function(t){return{tokenize:null,context:new n((t||0)-k,0,"top",false),indented:0,startOfLine:true}},token:function(w,v){var t=v.context;if(w.sol()){if(t.align==null){t.align=false}v.indented=w.indentation();v.startOfLine=true}if(w.eatSpace()){return null}o=null;var u=(v.tokenize||s)(w,v);if(u=="comment"||u=="meta"){return u}if(t.align==null){t.align=true}if((o==";"||o==":"||o==",")&&t.type=="statement"){p(v)}else{if(o=="{"){c(v,w.column(),"}")}else{if(o=="["){c(v,w.column(),"]")}else{if(o=="("){c(v,w.column(),")")}else{if(o=="}"){while(t.type=="statement"){t=p(v)}if(t.type=="}"){t=p(v)}while(t.type=="statement"){t=p(v)}}else{if(o==t.type){p(v)}else{if(((t.type=="}"||t.type=="top")&&o!=";")||(t.type=="statement"&&o=="newstatement")){c(v,w.column(),"statement")}}}}}}}v.startOfLine=false;return u},indent:function(x,u){if(x.tokenize!=s&&x.tokenize!=null){return CodeMirror.Pass}var t=x.context,w=u&&u.charAt(0);if(t.type=="statement"&&w=="}"){t=t.prev}var v=w==t.type;if(t.type=="statement"){return t.indented+(w=="{"?0:i)}else{if(t.align&&(!l||t.type!=")")){return t.column+(v?0:1)}else{if(t.type==")"&&!v){return t.indented+i}else{return t.indented+(v?0:k)}}}},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});(function(){function d(j){var g={},h=j.split(" ");for(var f=0;f <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),blockKeywords:d("catch class do else finally for forSome if match switch try while"),atoms:d("true false null"),hooks:{"@":function(f){f.eatWhile(/[\w\$_]/);return"meta"}}});a(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:d("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadowconst attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:d("for while do if else struct"),builtin:d("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smootstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:d("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragColor gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),hooks:{"#":e}})}());(function(){function c(g){var e={},f=g.split(" ");for(var d=0;d",false)){d.next()}return"comment"},"/":function(d){if(d.eat("/")){while(!d.eol()&&!d.match("?>",false)){d.next()}return"comment"}return false}}};CodeMirror.defineMode("php",function(f,g){var h=CodeMirror.getMode(f,"text/html");var d=CodeMirror.getMode(f,b);function e(n,l){var k=l.curMode==d;if(n.sol()&&l.pending!='"'){l.pending=null}if(!k){if(n.match(/^<\?\w*/)){l.curMode=d;l.curState=l.php;return"meta"}if(l.pending=='"'){while(!n.eol()&&n.next()!='"'){}var j="string"}else{if(l.pending&&n.pos/.test(m)){l.pending='"'}else{l.pending={end:n.pos,style:j}}n.backUp(m.length-i)}return j}else{if(k&&l.php.tokenize==null&&n.match("?>")){l.curMode=h;l.curState=l.html;return"meta"}else{return d.token(n,l.curState)}}}return{startState:function(){var i=CodeMirror.startState(h),j=CodeMirror.startState(d);return{html:i,php:j,curMode:g.startOpen?d:h,curState:g.startOpen?j:i,pending:null}},copyState:function(l){var j=l.html,k=CodeMirror.copyState(h,j),n=l.php,i=CodeMirror.copyState(d,n),m;if(l.curMode==h){m=k}else{m=i}return{html:k,php:i,curMode:l.curMode,curState:m,pending:l.pending}},token:e,indent:function(j,i){if((j.curMode!=d&&/^\s*<\//.test(i))||(j.curMode==d&&/^\?>/.test(i))){return h.indent(j.html,i)}return j.curMode.indent(j.curState,i)},electricChars:"/{}:",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(i){return{state:i.curState,mode:i.curMode}}}},"htmlmixed","clike");CodeMirror.defineMIME("application/x-httpd-php","php");CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});CodeMirror.defineMIME("text/x-php",b)})(); \ No newline at end of file diff --git a/skins/ckeditor/plugins/codemirror/lang/af.js b/skins/ckeditor/plugins/codemirror/lang/af.js new file mode 100755 index 0000000..391232d --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/af.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'af', { + toolbar: 'Bron', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ar.js b/skins/ckeditor/plugins/codemirror/lang/ar.js new file mode 100755 index 0000000..f855550 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ar.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ar', { + toolbar: 'المصدر', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/bg.js b/skins/ckeditor/plugins/codemirror/lang/bg.js new file mode 100755 index 0000000..ead6ef0 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/bg.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'bg', { + toolbar: 'Източник', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/bn.js b/skins/ckeditor/plugins/codemirror/lang/bn.js new file mode 100755 index 0000000..0916880 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/bn.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'bn', { + toolbar: 'সোর্স', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/bs.js b/skins/ckeditor/plugins/codemirror/lang/bs.js new file mode 100755 index 0000000..a565845 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/bs.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'bs', { + toolbar: 'HTML kôd', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ca.js b/skins/ckeditor/plugins/codemirror/lang/ca.js new file mode 100755 index 0000000..0549334 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ca.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ca', { + toolbar: 'Codi font', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/cs.js b/skins/ckeditor/plugins/codemirror/lang/cs.js new file mode 100755 index 0000000..e3ce93c --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/cs.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'cs', { + toolbar: 'Zdroj', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/cy.js b/skins/ckeditor/plugins/codemirror/lang/cy.js new file mode 100755 index 0000000..c04c631 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/cy.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'cy', { + toolbar: 'HTML', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/da.js b/skins/ckeditor/plugins/codemirror/lang/da.js new file mode 100755 index 0000000..b568af6 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/da.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'da', { + toolbar: 'Kilde', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/de.js b/skins/ckeditor/plugins/codemirror/lang/de.js new file mode 100755 index 0000000..40cb3cb --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/de.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'de', { + toolbar: 'Quellcode', + searchCode: 'Quellcode durchsuchen', + autoFormat: 'Auswahl formatieren', + commentSelectedRange: 'Auswahl auskommentieren', + uncommentSelectedRange: 'Auskommentierung entferen', + autoCompleteToggle: 'HTML Tag Autovervollständigen de-/aktivieren' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/el.js b/skins/ckeditor/plugins/codemirror/lang/el.js new file mode 100755 index 0000000..748f8bb --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/el.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'el', { + toolbar: 'HTML κώδικας', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/en-au.js b/skins/ckeditor/plugins/codemirror/lang/en-au.js new file mode 100755 index 0000000..3a02391 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/en-au.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'en-au', { + toolbar: 'Source', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/en-ca.js b/skins/ckeditor/plugins/codemirror/lang/en-ca.js new file mode 100755 index 0000000..6fa2cd9 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/en-ca.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'en-ca', { + toolbar: 'Source', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/en-gb.js b/skins/ckeditor/plugins/codemirror/lang/en-gb.js new file mode 100755 index 0000000..f8b502c --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/en-gb.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'en-gb', { + toolbar: 'Source', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/en.js b/skins/ckeditor/plugins/codemirror/lang/en.js new file mode 100755 index 0000000..5ef2b06 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/en.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'en', { + toolbar: 'Source', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/eo.js b/skins/ckeditor/plugins/codemirror/lang/eo.js new file mode 100755 index 0000000..996c824 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/eo.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'eo', { + toolbar: 'Fonto', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/es.js b/skins/ckeditor/plugins/codemirror/lang/es.js new file mode 100755 index 0000000..c61cd56 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/es.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'es', { + toolbar: 'Fuente HTML', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/et.js b/skins/ckeditor/plugins/codemirror/lang/et.js new file mode 100755 index 0000000..4233be3 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/et.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'et', { + toolbar: 'Lähtekood', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/eu.js b/skins/ckeditor/plugins/codemirror/lang/eu.js new file mode 100755 index 0000000..2279b82 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/eu.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'eu', { + toolbar: 'HTML Iturburua', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/fa.js b/skins/ckeditor/plugins/codemirror/lang/fa.js new file mode 100755 index 0000000..bae9838 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/fa.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'fa', { + toolbar: 'منبع', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/fi.js b/skins/ckeditor/plugins/codemirror/lang/fi.js new file mode 100755 index 0000000..902a5f2 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/fi.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'fi', { + toolbar: 'Koodi', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/fo.js b/skins/ckeditor/plugins/codemirror/lang/fo.js new file mode 100755 index 0000000..731e120 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/fo.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'fo', { + toolbar: 'Kelda', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/fr-ca.js b/skins/ckeditor/plugins/codemirror/lang/fr-ca.js new file mode 100755 index 0000000..a760293 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/fr-ca.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'fr-ca', { + toolbar: 'Source', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/fr.js b/skins/ckeditor/plugins/codemirror/lang/fr.js new file mode 100755 index 0000000..a421588 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/fr.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'fr', { + toolbar: 'Source', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/gl.js b/skins/ckeditor/plugins/codemirror/lang/gl.js new file mode 100755 index 0000000..8d7743f --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/gl.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'gl', { + toolbar: 'Código Fonte', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/gu.js b/skins/ckeditor/plugins/codemirror/lang/gu.js new file mode 100755 index 0000000..e236288 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/gu.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'gu', { + toolbar: 'મૂળ કે પ્રાથમિક દસ્તાવેજ', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/he.js b/skins/ckeditor/plugins/codemirror/lang/he.js new file mode 100755 index 0000000..da68b13 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/he.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'he', { + toolbar: 'מקור', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/hi.js b/skins/ckeditor/plugins/codemirror/lang/hi.js new file mode 100755 index 0000000..eeefc33 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/hi.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'hi', { + toolbar: 'सोर्स', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/hr.js b/skins/ckeditor/plugins/codemirror/lang/hr.js new file mode 100755 index 0000000..dd9c492 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/hr.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'hr', { + toolbar: 'Kôd', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/hu.js b/skins/ckeditor/plugins/codemirror/lang/hu.js new file mode 100755 index 0000000..6f51fbb --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/hu.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'hu', { + toolbar: 'Forráskód', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/is.js b/skins/ckeditor/plugins/codemirror/lang/is.js new file mode 100755 index 0000000..192dd3a --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/is.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'is', { + toolbar: 'Kóði', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/it.js b/skins/ckeditor/plugins/codemirror/lang/it.js new file mode 100755 index 0000000..1fe3a78 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/it.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'it', { + toolbar: 'Codice Sorgente', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ja.js b/skins/ckeditor/plugins/codemirror/lang/ja.js new file mode 100755 index 0000000..48a8e3c --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ja.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ja', { + toolbar: 'ソース', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ka.js b/skins/ckeditor/plugins/codemirror/lang/ka.js new file mode 100755 index 0000000..8cdd48f --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ka.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ka', { + toolbar: 'კოდები', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/km.js b/skins/ckeditor/plugins/codemirror/lang/km.js new file mode 100755 index 0000000..0d357ea --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/km.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'km', { + toolbar: 'កូត', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ko.js b/skins/ckeditor/plugins/codemirror/lang/ko.js new file mode 100755 index 0000000..bad2093 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ko.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ko', { + toolbar: '소스', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ku.js b/skins/ckeditor/plugins/codemirror/lang/ku.js new file mode 100755 index 0000000..8cbea85 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ku.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ku', { + toolbar: 'سەرچاوە', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/lt.js b/skins/ckeditor/plugins/codemirror/lang/lt.js new file mode 100755 index 0000000..daf83de --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/lt.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'lt', { + toolbar: 'Å altinis', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/lv.js b/skins/ckeditor/plugins/codemirror/lang/lv.js new file mode 100755 index 0000000..5796d28 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/lv.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'lv', { + toolbar: 'HTML kods', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/mk.js b/skins/ckeditor/plugins/codemirror/lang/mk.js new file mode 100755 index 0000000..814076f --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/mk.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'mk', { + toolbar: 'Source', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/mn.js b/skins/ckeditor/plugins/codemirror/lang/mn.js new file mode 100755 index 0000000..0698d16 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/mn.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'mn', { + toolbar: 'Код', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ms.js b/skins/ckeditor/plugins/codemirror/lang/ms.js new file mode 100755 index 0000000..d612f53 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ms.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ms', { + toolbar: 'Sumber', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/nb.js b/skins/ckeditor/plugins/codemirror/lang/nb.js new file mode 100755 index 0000000..9c60672 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/nb.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'nb', { + toolbar: 'Kilde', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/nl.js b/skins/ckeditor/plugins/codemirror/lang/nl.js new file mode 100755 index 0000000..887a57f --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/nl.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'nl', { + toolbar: 'Code', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/no.js b/skins/ckeditor/plugins/codemirror/lang/no.js new file mode 100755 index 0000000..1df41b4 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/no.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'no', { + toolbar: 'Kilde', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/pl.js b/skins/ckeditor/plugins/codemirror/lang/pl.js new file mode 100755 index 0000000..a3ac0df --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/pl.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'pl', { + toolbar: 'Źródło dokumentu', + autoFormat: 'Sformatuj zaznaczenie', + commentSelectedRange: 'Zakomentuj zaznaczenie', + uncommentSelectedRange: 'Odkomentuj zaznaczenie', + searchCode: 'Wyszukaj w źródle', + autoCompleteToggle: 'Włącza/Wyłącza automatyczne uzupełniania tagów HTML' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/pt-br.js b/skins/ckeditor/plugins/codemirror/lang/pt-br.js new file mode 100755 index 0000000..db28471 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/pt-br.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'pt-br', { + toolbar: 'Código-Fonte', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/pt.js b/skins/ckeditor/plugins/codemirror/lang/pt.js new file mode 100755 index 0000000..1bcf82c --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/pt.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'pt', { + toolbar: 'Fonte', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ro.js b/skins/ckeditor/plugins/codemirror/lang/ro.js new file mode 100755 index 0000000..8b2a460 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ro.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ro', { + toolbar: 'Sursa', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ru.js b/skins/ckeditor/plugins/codemirror/lang/ru.js new file mode 100755 index 0000000..938ebee --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ru.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ru', { + toolbar: 'Источник', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/sk.js b/skins/ckeditor/plugins/codemirror/lang/sk.js new file mode 100755 index 0000000..0b42cf6 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/sk.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'sk', { + toolbar: 'Zdroj', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/sl.js b/skins/ckeditor/plugins/codemirror/lang/sl.js new file mode 100755 index 0000000..cd46557 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/sl.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'sl', { + toolbar: 'Izvorna koda', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/sr-latn.js b/skins/ckeditor/plugins/codemirror/lang/sr-latn.js new file mode 100755 index 0000000..8e8a6c2 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/sr-latn.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'sr-latn', { + toolbar: 'Kôd', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/sr.js b/skins/ckeditor/plugins/codemirror/lang/sr.js new file mode 100755 index 0000000..d806f9b --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/sr.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'sr', { + toolbar: 'Kôд', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/sv.js b/skins/ckeditor/plugins/codemirror/lang/sv.js new file mode 100755 index 0000000..933d087 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/sv.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'sv', { + toolbar: 'Källa', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/th.js b/skins/ckeditor/plugins/codemirror/lang/th.js new file mode 100755 index 0000000..1baf79a --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/th.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'th', { + toolbar: 'ดูรหัส HTML', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/tr.js b/skins/ckeditor/plugins/codemirror/lang/tr.js new file mode 100755 index 0000000..0767c15 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/tr.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'tr', { + toolbar: 'Kaynak', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/ug.js b/skins/ckeditor/plugins/codemirror/lang/ug.js new file mode 100755 index 0000000..5dd579b --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/ug.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'ug', { + toolbar: 'مەنبە', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/uk.js b/skins/ckeditor/plugins/codemirror/lang/uk.js new file mode 100755 index 0000000..966d9e1 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/uk.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'uk', { + toolbar: 'Джерело', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/vi.js b/skins/ckeditor/plugins/codemirror/lang/vi.js new file mode 100755 index 0000000..b5d8a2d --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/vi.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'vi', { + toolbar: 'Mã HTML', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/zh-cn.js b/skins/ckeditor/plugins/codemirror/lang/zh-cn.js new file mode 100755 index 0000000..3aba758 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/zh-cn.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'zh-cn', { + toolbar: '源码', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/lang/zh.js b/skins/ckeditor/plugins/codemirror/lang/zh.js new file mode 100755 index 0000000..818964f --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/lang/zh.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'codemirror', 'zh', { + toolbar: '原始碼', + searchCode: 'Search Source', + autoFormat: 'Format Selection', + commentSelectedRange: 'Comment Selection', + uncommentSelectedRange: 'Uncomment Selection', + autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete' +}); diff --git a/skins/ckeditor/plugins/codemirror/plugin.js b/skins/ckeditor/plugins/codemirror/plugin.js new file mode 100755 index 0000000..6430e68 --- /dev/null +++ b/skins/ckeditor/plugins/codemirror/plugin.js @@ -0,0 +1,998 @@ +/* +* The "codemirror" plugin. It's indented to enhance the +* "sourcearea" editing mode, which displays the xhtml source code with +* syntax highlight and line numbers. +* Licensed under the MIT license +* CodeMirror Plugin: http://codemirror.net/ (MIT License) +*/ + +(function() { + CKEDITOR.plugins.add('codemirror', { + icons: 'SearchCode,AutoFormat,CommentSelectedRange,UncommentSelectedRange,AutoComplete', + lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh', + version: 1.10, + init: function (editor) { + var rootPath = this.path, + defaultConfig = { + autoCloseBrackets: true, + autoCloseTags: true, + autoFormatOnStart: false, + autoFormatOnUncomment: true, + continueComments: true, + enableCodeFolding: true, + enableCodeFormatting: true, + enableSearchTools: true, + highlightActiveLine: true, + highlightMatches: true, + indentWithTabs: false, + lineNumbers: true, + lineWrapping: true, + mode: 'htmlmixed', + matchBrackets: true, + matchTags: true, + showAutoCompleteButton: true, + showCommentButton: true, + showFormatButton: true, + showSearchButton: true, + showTrailingSpace: true, + showUncommentButton: true, + theme: 'default', + useBeautify: false + }; + + // Get Config & Lang + var config = CKEDITOR.tools.extend(defaultConfig, editor.config.codemirror || {}, true), + lang = editor.lang.codemirror; + + // check for old config settings for legacy support + if (editor.config.codemirror_theme) { + config.theme = editor.config.codemirror_theme; + } + if (editor.config.codemirror_autoFormatOnStart) { + config.autoFormatOnStart = editor.config.codemirror_autoFormatOnStart; + } + + // Source mode isn't available in inline mode yet. + if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE) { + + // Override Source Dialog + CKEDITOR.dialog.add('sourcedialog', function (editor) { + var size = CKEDITOR.document.getWindow().getViewPaneSize(), + width = Math.min(size.width - 70, 800), + height = size.height / 1.5, + oldData; + + function loadCodeMirrorInline(editor, textarea) { + var delay; + + window["codemirror_" + editor.id] = CodeMirror.fromTextArea(textarea, { + mode: config.mode, + matchBrackets: config.matchBrackets, + matchTags: config.matchTags, + workDelay: 300, + workTime: 35, + readOnly: editor.config.readOnly, + lineNumbers: config.lineNumbers, + lineWrapping: config.lineWrapping, + autoCloseTags: config.autoCloseTags, + autoCloseBrackets: config.autoCloseBrackets, + highligctionMatches: config.highlightMatches, + continueComments: config.continueComments, + indentWithTabs: config.indentWithTabs, + theme: config.theme, + showTrailingSpace: config.showTrailingSpace, + showCursorWhenSelecting: true, + viewportMargin: Infinity, + //extraKeys: {"Ctrl-Space": "autocomplete"}, + extraKeys: { "Ctrl-Q": function (codeMirror_Editor) { window["foldFunc_" + editor.id](codeMirror_Editor, codeMirror_Editor.getCursor().line); } }, + onKeyEvent: function (codeMirror_Editor, evt) { + if (config.enableCodeFormatting) { + var range = getSelectedRange(); + if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && !evt.altKey) { + window["codemirror_" + editor.id].commentRange(true, range.from, range.to); + } else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && evt.shiftKey && !evt.altKey) { + window["codemirror_" + editor.id].commentRange(false, range.from, range.to); + if (config.autoFormatOnUncomment) { + window["codemirror_" + editor.id].autoFormatRange(range.from, range.to); + } + } else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && evt.altKey) { + window["codemirror_" + editor.id].autoFormatRange(range.from, range.to); + } + /*else if (evt.type === "keydown") { + CodeMirror.commands.newlineAndIndentContinueMarkdownList(window["codemirror_" + editor.id]); + }*/ + } + } + }); + + var holderHeight = height + 'px'; + var holderWidth = width + 'px'; + + // Store config so we can access it within commands etc. + window["codemirror_" + editor.id].config = config; + + if (config.autoFormatOnStart) { + if (config.useBeautify) { + var indent_size = 4, + indent_char = ' ', + brace_style = 'collapse'; //collapse, expand, end-expand + + var source = window["codemirror_" + editor.id].getValue(); + + window["codemirror_" + editor.id].setValue(html_beautify(source, indent_size, indent_char, 120, brace_style)); + } else { + window["codemirror_" + editor.id].autoFormatAll({ + line: 0, + ch: 0 + }, { + line: window["codemirror_" + editor.id].lineCount(), + ch: 0 + }); + } + } + + function getSelectedRange() { + return { + from: window["codemirror_" + editor.id].getCursor(true), + to: window["codemirror_" + editor.id].getCursor(false) + }; + } + + window["codemirror_" + editor.id].on("change", function () { + clearTimeout(delay); + delay = setTimeout(function () { + var cm = window["codemirror_" + editor.id]; + + if (cm) { + cm.save(); + } + }, 300); + }); + + window["codemirror_" + editor.id].setSize(holderWidth, holderHeight); + + // Enable Code Folding (Requires 'lineNumbers' to be set to 'true') + if (config.lineNumbers && config.enableCodeFolding) { + window["codemirror_" + editor.id].on("gutterClick", window["foldFunc_" + editor.id]); + } + // Highlight Active Line + if (config.highlightActiveLine) { + window["codemirror_" + editor.id].hlLine = window["codemirror_" + editor.id].addLineClass(0, "background", "activeline"); + window["codemirror_" + editor.id].on("cursorActivity", function () { + var cur = window["codemirror_" + editor.id].getLineHandle(window["codemirror_" + editor.id].getCursor().line); + if (cur != window["codemirror_" + editor.id].hlLine) { + window["codemirror_" + editor.id].removeLineClass(window["codemirror_" + editor.id].hlLine, "background", "activeline"); + window["codemirror_" + editor.id].hlLine = window["codemirror_" + editor.id].addLineClass(cur, "background", "activeline"); + } + }); + } + + // Run config.onLoad callback, if present. + if (typeof config.onLoad === 'function') { + config.onLoad(window["codemirror_" + editor.id], editor); + } + } + + return { + title: editor.lang.sourcedialog.title, + minWidth: width, + minHeight: height, + resizable : CKEDITOR.DIALOG_RESIZE_NONE, + onShow: function () { + // Set Elements + this.getContentElement('main', 'data').focus(); + this.getContentElement('main', 'AutoComplete').setValue(config.autoCloseTags, true); + + var textArea = this.getContentElement('main', 'data').getInputElement().$; + + // Load the content + this.setValueOf('main', 'data', oldData = editor.getData()); + + if (typeof (CodeMirror) == 'undefined') { + + CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css'); + + if (config.theme.length && config.theme != 'default') { + CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css'); + } + + CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js', function () { + + CKEDITOR.scriptLoader.load(getCodeMirrorScripts(), function () { + loadCodeMirrorInline(editor, textArea); + }); + }); + + + } else { + loadCodeMirrorInline(editor, textArea); + } + + + }, + onCancel: function (event) { + if (event.data.hide) { + window["codemirror_" + editor.id].toTextArea(); + + // Free Memory + window["codemirror_" + editor.id] = null; + } + }, + onOk: (function () { + + function setData(newData) { + var that = this; + + editor.setData(newData, function () { + that.hide(); + + // Ensure correct selection. + var range = editor.createRange(); + range.moveToElementEditStart(editor.editable()); + range.select(); + }); + } + + return function () { + window["codemirror_" + editor.id].toTextArea(); + + // Free Memory + window["codemirror_" + editor.id] = null; + + // Remove CR from input data for reliable comparison with editor data. + var newData = this.getValueOf('main', 'data').replace(/\r/g, ''); + + // Avoid unnecessary setData. Also preserve selection + // when user changed his mind and goes back to wysiwyg editing. + if (newData === oldData) + return true; + + // Set data asynchronously to avoid errors in IE. + CKEDITOR.env.ie ? CKEDITOR.tools.setTimeout(setData, 0, this, newData) : setData.call(this, newData); + + // Don't let the dialog close before setData is over. + return false; + }; + })(), + + contents: [{ + id: 'main', + label: editor.lang.sourcedialog.title, + elements: [ + { + type: 'hbox', + style: 'width: 80px;margin:0;', + widths: ['20px', '20px', '20px', '20px'], + children: [ + { + type: 'button', + id: 'searchCode', + label: '', + title: lang.searchCode, + 'class': 'searchCodeButton', + onClick: function() { + CodeMirror.commands.find(window["codemirror_" + editor.id]); + } + }, { + type: 'button', + id: 'autoFormat', + label: '', + title: lang.autoFormat, + 'class': 'autoFormat', + onClick: function() { + var range = { + from: window["codemirror_" + editor.id].getCursor(true), + to: window["codemirror_" + editor.id].getCursor(false) + }; + window["codemirror_" + editor.id].autoFormatRange(range.from, range.to); + } + }, { + type: 'button', + id: 'CommentSelectedRange', + label: '', + title: lang.commentSelectedRange, + 'class': 'CommentSelectedRange', + onClick: function () { + var range = { + from: window["codemirror_" + editor.id].getCursor(true), + to: window["codemirror_" + editor.id].getCursor(false) + }; + window["codemirror_" + editor.id].commentRange(true, range.from, range.to); + } + }, { + type: 'button', + id: 'UncommentSelectedRange', + label: '', + title: lang.uncommentSelectedRange, + 'class': 'UncommentSelectedRange', + onClick: function () { + var range = { + from: window["codemirror_" + editor.id].getCursor(true), + to: window["codemirror_" + editor.id].getCursor(false) + }; + window["codemirror_" + editor.id].commentRange(false, range.from, range.to); + if (window["codemirror_" + editor.id].config.autoFormatOnUncomment) { + window["codemirror_" + editor.id].autoFormatRange(range.from, range.to); + } + } + }] + }, { + type: 'checkbox', + id: 'AutoComplete', + label: lang.autoCompleteToggle, + title: lang.autoCompleteToggle, + onChange: function () { + window["codemirror_" + editor.id].setOption("autoCloseTags", this.getValue()); + } + }, { + type: 'textarea', + id: 'data', + dir: 'ltr', + inputStyle: 'cursor:auto;' + + 'width:' + width + 'px;' + + 'height:' + height + 'px;' + + 'tab-size:4;' + + 'text-align:left;', + 'class': 'cke_source cke_enable_context_menu' + } + ] + }] + }; + }); + + return; + } + + var sourcearea = CKEDITOR.plugins.sourcearea; + + // check if sourcearea plugin is overrriden + if (!sourcearea.commands.searchCode) { + + CKEDITOR.plugins.sourcearea.commands = { + source: { + modes: { + wysiwyg: 1, + source: 1 + }, + editorFocus: false, + readOnly: 1, + exec: function(editorInstance) { + if (editorInstance.mode === 'wysiwyg') { + editorInstance.fire('saveSnapshot'); + } + editorInstance.getCommand('source').setState(CKEDITOR.TRISTATE_DISABLED); + editorInstance.setMode(editorInstance.mode === 'source' ? 'wysiwyg' : 'source'); + }, + canUndo: false + }, + searchCode: { + modes: { + wysiwyg: 0, + source: 1 + }, + editorFocus: false, + readOnly: 1, + exec: function (editorInstance) { + CodeMirror.commands.find(window["codemirror_" + editorInstance.id]); + }, + canUndo: true + }, + autoFormat: { + modes: { + wysiwyg: 0, + source: 1 + }, + editorFocus: false, + readOnly: 1, + exec: function (editorInstance) { + var range = { + from: window["codemirror_" + editorInstance.id].getCursor(true), + to: window["codemirror_" + editorInstance.id].getCursor(false) + }; + window["codemirror_" + editorInstance.id].autoFormatRange(range.from, range.to); + }, + canUndo: true + }, + commentSelectedRange: { + modes: { + wysiwyg: 0, + source: 1 + }, + editorFocus: false, + readOnly: 1, + exec: function (editorInstance) { + var range = { + from: window["codemirror_" + editorInstance.id].getCursor(true), + to: window["codemirror_" + editorInstance.id].getCursor(false) + }; + window["codemirror_" + editorInstance.id].commentRange(true, range.from, range.to); + }, + canUndo: true + }, + uncommentSelectedRange: { + modes: { + wysiwyg: 0, + source: 1 + }, + editorFocus: false, + readOnly: 1, + exec: function (editorInstance) { + var range = { + from: window["codemirror_" + editorInstance.id].getCursor(true), + to: window["codemirror_" + editorInstance.id].getCursor(false) + }; + window["codemirror_" + editorInstance.id].commentRange(false, range.from, range.to); + if (window["codemirror_" + editorInstance.id].config.autoFormatOnUncomment) { + window["codemirror_" + editorInstance.id].autoFormatRange( + range.from, + range.to); + } + }, + canUndo: true + }, + autoCompleteToggle: { + modes: { + wysiwyg: 0, + source: 1 + }, + editorFocus: false, + readOnly: 1, + exec: function (editorInstance) { + if (this.state == CKEDITOR.TRISTATE_ON) { + window["codemirror_" + editorInstance.id].setOption("autoCloseTags", false); + } else if (this.state == CKEDITOR.TRISTATE_OFF) { + window["codemirror_" + editorInstance.id].setOption("autoCloseTags", true); + } + + this.toggleState(); + }, + canUndo: true + } + }; + } + + + + + editor.addMode('source', function(callback) { + if (typeof (CodeMirror) == 'undefined') { + + CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css'); + + if (config.theme.length && config.theme != 'default') { + CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css'); + } + + CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js', function() { + + CKEDITOR.scriptLoader.load(getCodeMirrorScripts(), function() { + loadCodeMirror(editor); + callback(); + }); + }); + + + } else { + loadCodeMirror(editor); + callback(); + } + }); + + function getCodeMirrorScripts() { + var scriptFiles = [rootPath + 'js/codemirror.addons.min.js']; + + switch (config.mode) { + case "htmlmixed": + { + scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js'); + } + + break; + case "text/html": + { + scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js'); + } + + break; + case "application/x-httpd-php": + { + scriptFiles.push(rootPath + 'js/codemirror.mode.php.min.js'); + } + + break; + case "text/javascript": + { + scriptFiles.push(rootPath + 'js/codemirror.mode.javascript.min.js'); + } + + break; + default: + scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js'); + } + + if (config.useBeautify) { + scriptFiles.push(rootPath + 'js/beautify.min.js'); + } + + if (config.enableSearchTools) { + scriptFiles.push(rootPath + 'js/codemirror.addons.search.min.js'); + } + return scriptFiles; + } + + function loadCodeMirror(editor) { + var contentsSpace = editor.ui.space('contents'), + textarea = contentsSpace.getDocument().createElement('textarea'); + + textarea.setStyles( + CKEDITOR.tools.extend({ + // IE7 has overflow the