芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/www/panel/vendors/tinymce/plugins/visualchars/plugin.min.js
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i
-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d
=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e
1)throw c.error("HTML does not have a single root node",a),"HTML must have a single root node";return h(f.childNodes[0])},f=function(a,b){var c=b||d,e=c.createElement(a);return h(e)},g=function(a,b){var c=b||d,e=c.createTextNode(a);return h(e)},h=function(c){if(null===c||void 0===c)throw new b("Node cannot be null or undefined");return{dom:a.constant(c)}};return{fromHtml:e,fromTag:f,fromText:g,fromDom:h}}),g("e",[],function(){var a={"\xa0":"nbsp","\xad":"shy"},b=function(a,b){var c,d="";for(c in a)d+=c;return new RegExp("["+d+"]",b?"g":"")},c=function(a){var b,c="";for(b in a)c&&(c+=","),c+="span.mce-"+a[b];return c};return{charMap:a,regExp:b(a),regExpGlobal:b(a,!0),selector:c(a),charMapToRegExp:b,charMapToSelector:c}}),g("i",[],function(){return{ATTRIBUTE:2,CDATA_SECTION:4,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,ELEMENT:1,TEXT:3,PROCESSING_INSTRUCTION:7,ENTITY_REFERENCE:5,ENTITY:6,NOTATION:12}}),g("g",["i"],function(a){var b=function(a){var b=a.dom().nodeName;return b.toLowerCase()},c=function(a){return a.dom().nodeType},d=function(a){return a.dom().nodeValue},e=function(a){return function(b){return c(b)===a}},f=function(d){return c(d)===a.COMMENT||"#comment"===b(d)},g=e(a.ELEMENT),h=e(a.TEXT),i=e(a.DOCUMENT);return{name:b,type:c,value:d,isElement:g,isText:h,isDocument:i,isComment:f}}),g("j",["e"],function(a){var b=function(b){return'
'+b+"
"};return{wrapCharWithSpan:b}}),g("f",["3","4","g","e","j"],function(a,b,c,d,e){var f=function(a){return c.isText(a)&&void 0!==c.value(a)&&d.regExp.test(c.value(a))},g=function(c,d){var e=[],f=c.dom(),h=a.map(f.childNodes,b.fromDom);return a.each(h,function(a){d(a)&&(e=e.concat([a])),e=e.concat(g(a,d))}),e},h=function(a,b){for(;a.parentNode;){if(a.parentNode===b)return a;a=a.parentNode}},i=function(a){return a.replace(d.regExpGlobal,e.wrapCharWithSpan)};return{isMatch:f,filterDescendants:g,findParentElm:h,replaceWithSpans:i}}),g("5",["e","f","3","4","g"],function(a,b,c,d,e){var f=function(a,f){var g,h,i=b.filterDescendants(d.fromDom(f),b.isMatch);c.each(i,function(c){var d=b.replaceWithSpans(e.value(c));for(h=a.dom.create("div",null,d);g=h.lastChild;)a.dom.insertAfter(g,c.dom());a.dom.remove(c.dom())})},g=function(b,d){var e=b.dom.select(a.selector,d);c.each(e,function(a){b.dom.remove(a,1)})},h=function(a){var c=a.getBody(),d=a.selection.getBookmark(),e=b.findParentElm(a.selection.getNode(),c);e=void 0!==e?e:c,g(a,e),f(a,e),a.selection.moveToBookmark(d)};return{show:f,hide:g,toggle:h}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return a.add("visualchars",function(a){var c,d=this,f=function(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})},g=b.debounce(function(){e.toggle(a)},300);a.settings.forced_root_block!==!1&&a.on("keydown",function(b){d.state===!0&&(13===b.keyCode?e.toggle(a):g())}),a.addCommand("mceVisualChars",function(){var b,f=a.getBody(),g=a.selection;c=!c,d.state=c,a.fire("VisualChars",{state:c}),b=g.getBookmark(),c===!0?e.show(a,f):e.hide(a,f),g.moveToBookmark(b)}),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:f}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:f,selectable:!0,context:"view",prependToContext:!0})}),function(){}}),d("0")()}();