X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=ckeditor.js;h=b9a03d6125794ae3b4745c6d2108f6e1a768a52e;hp=cfdeec4a3a288d8a6ec039fa5cac191b0ca6ae46;hb=749be886bb4b0ebf70be13397f2279d5446cd0c8;hpb=9b6ca941425f97c9d5103a30101a7ac805cf675d diff --git a/ckeditor.js b/ckeditor.js index cfdeec4..b9a03d6 100644 --- a/ckeditor.js +++ b/ckeditor.js @@ -2,416 +2,416 @@ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"D3NA",version:"4.1.1",revision:"5a2a7e3",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var a=document.getElementsByTagName("script"),d=0;d=0;p--)if(n[p].priority<=l){n.splice(p+1,0,i);return{removeListener:m}}n.unshift(i)}return{removeListener:m}}, -once:function(){var b=arguments[1];arguments[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,a=function(){b=1},d=0,j=function(){d=1};return function(l,i,m){var n=c(this)[l],l=b,r=d;b=d=0;if(n){var p=n.listeners;if(p.length)for(var p=p.slice(0),g,h=0;h=0&&d.listeners.splice(j,1)}},removeAllListeners:function(){var b=c(this),a;for(a in b)delete b[a]},hasListeners:function(b){return(b=c(this)[b])&&b.listeners.length>0}}}()); -CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,c){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,c,this)},CKEDITOR.editor.prototype.fireOnce=function(a,c){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); -CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),c=window.opera,b={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var b=document.domain,a=window.location.hostname;return b!=a&&b!="["+a+"]"},secure:location.protocol== -"https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var f=0;if(b.ie){f=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=f==9;b.ie8Compat=f==8;b.ie7Compat=f==7;b.ie6Compat=f<7||b.quirks}if(b.gecko){var e=a.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");f=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}b.opera&&(f=parseFloat(c.version()));b.air&&(f=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); -b.webkit&&(f=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=f;b.isCompatible=b.iOS&&f>=534||!b.mobile&&(b.ie&&f>6||b.gecko&&f>=10801||b.opera&&f>=9.5||b.air&&f>=1||b.webkit&&f>=522||false);b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.opera?"opera":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";if(b.ie){b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks||b.version<7?"6":b.version));if(b.quirks)b.cssClass=b.cssClass+" cke_browser_iequirks"}if(b.gecko)if(f< -10900)b.cssClass=b.cssClass+" cke_browser_gecko18";else if(f<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";return b}()); -"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= -CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; -(function(){var a=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var e=0;e"+a+""):e.push('');return e.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var e=a(b);e.prototype=b.prototype;return e},setTimeout:function(b,a,e,d,c){c||(c=window);e||(e=c);return c.setTimeout(function(){d?b.apply(e,[].concat(d)):b.apply(e)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g; -return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var e=0,d=b.length;e=0?b[e]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$, -e=b.base,d=b.privates||b._,c=b.proto,b=b.statics;!a&&(a=function(){e&&this.base.apply(this,arguments)});if(d)var l=a,a=function(){var b=this._||(this._={}),a;for(a in d){var f=d[a];b[a]=typeof f=="function"?CKEDITOR.tools.bind(f,this):f}l.apply(this,arguments)};if(e){a.prototype=this.prototypedCopy(e.prototype);a.prototype.constructor=a;a.base=e;a.baseProto=e.prototype;a.prototype.base=function(){this.base=e.prototype.base;e.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(a.prototype, -c,true);b&&this.extend(a,b,true);return a},addFunction:function(b,f){return a.push(function(){return b.apply(f||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var f=a[b];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var b=/^-?\d+\.?\d*px$/,a;return function(e){a=CKEDITOR.tools.trim(e+"")+"px";return b.test(a)?a:e||""}}(),convertToPx:function(){var b;return function(a){if(!b){b=CKEDITOR.dom.element.createFromHtml('
', -CKEDITOR.document);CKEDITOR.document.getBody().append(b)}if(!/%$/.test(a)){b.setStyle("width",a);return b.$.clientWidth}return a}}(),repeat:function(b,a){return Array(a+1).join(b)},tryThese:function(){for(var b,a=0,e=arguments.length;a=0;p--)if(n[p].priority<=l){n.splice(p+1,0,j);return{removeListener:m}}n.unshift(j)}return{removeListener:m}}, +once:function(){var a=arguments[1];arguments[1]=function(b){b.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},d=0,i=function(){d=1};return function(l,j,m){var n=c(this)[l],l=a,q=d;a=d=0;if(n){var p=n.listeners;if(p.length)for(var p=p.slice(0),h,g=0;g=0&&d.listeners.splice(i,1)}},removeAllListeners:function(){var a=c(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=c(this)[a])&&a.listeners.length>0}}}()); +CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,c,this)},CKEDITOR.editor.prototype.fireOnce=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); +CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,e=window.location.hostname;return a!=e&&a!="["+e+"]"},secure:location.protocol== +"https:"};a.gecko=navigator.product=="Gecko"&&!a.webkit&&!a.opera;if(a.webkit)b.indexOf("chrome")>-1?a.chrome=true:a.safari=true;var e=0;if(a.ie){e=a.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=e==9;a.ie8Compat=e==8;a.ie7Compat=e==7;a.ie6Compat=e<7||a.quirks}if(a.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split(".");e=f[0]*1E4+(f[1]||0)*100+(f[2]||0)*1}}a.opera&&(e=parseFloat(c.version()));a.air&&(e=parseFloat(b.match(/ adobeair\/(\d+)/)[1])); +a.webkit&&(e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=e;a.isCompatible=a.iOS&&e>=534||!a.mobile&&(a.ie&&e>6||a.gecko&&e>=10801||a.opera&&e>=9.5||a.air&&e>=1||a.webkit&&e>=522||false);a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown");if(a.quirks)a.cssClass=a.cssClass+" cke_browser_quirks";if(a.ie){a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version));if(a.quirks)a.cssClass=a.cssClass+" cke_browser_iequirks"}if(a.gecko)if(e< +10900)a.cssClass=a.cssClass+" cke_browser_gecko18";else if(e<=11E3)a.cssClass=a.cssClass+" cke_browser_gecko19";if(a.air)a.cssClass=a.cssClass+" cke_browser_air";if(a.iOS)a.cssClass=a.cssClass+" cke_browser_ios";return a}()); +"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b= +CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(b){CKEDITOR.status="basic_ready";b&&b._load?b():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; +(function(){var b=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){b=[]});CKEDITOR.tools={arrayCompare:function(a,e){if(!a&&!e)return true;if(!a||!e||a.length!=e.length)return false;for(var b=0;b"+b+""):f.push('');return f.join("")},htmlEncode:function(a){return(""+a).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,b){var f=b(a);f.prototype=a.prototype;return f},setTimeout:function(a,b,f,d,c){c||(c=window);f||(f=c);return c.setTimeout(function(){d?a.apply(f,[].concat(d)):a.apply(f)},b||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g; +return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:function(a,b){if(typeof b=="function")for(var f=0,d=a.length;f=0?a[f]:null},bind:function(a,b){return function(){return a.apply(b,arguments)}},createClass:function(a){var b=a.$, +f=a.base,d=a.privates||a._,c=a.proto,a=a.statics;!b&&(b=function(){f&&this.base.apply(this,arguments)});if(d)var l=b,b=function(){var a=this._||(this._={}),b;for(b in d){var e=d[b];a[b]=typeof e=="function"?CKEDITOR.tools.bind(e,this):e}l.apply(this,arguments)};if(f){b.prototype=this.prototypedCopy(f.prototype);b.prototype.constructor=b;b.base=f;b.baseProto=f.prototype;b.prototype.base=function(){this.base=f.prototype.base;f.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(b.prototype, +c,true);a&&this.extend(b,a,true);return b},addFunction:function(a,e){return b.push(function(){return a.apply(e||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var e=b[a];return e&&e.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(f){b=CKEDITOR.tools.trim(f+"")+"px";return a.test(b)?b:f||""}}(),convertToPx:function(){var a;return function(b){if(!a){a=CKEDITOR.dom.element.createFromHtml('
', +CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,f=arguments.length;b8)&&c)a=c+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a= -a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){var a=new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return a})()},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.isCustomDomain()&&(this.$.domain=document.domain); -this.$.write(a);this.$.close()}});CKEDITOR.dom.nodeList=function(a){this.$=a};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){if(a<0||a>=this.$.length)return null;return(a=this.$[a])?new CKEDITOR.dom.node(a):null}};CKEDITOR.dom.element=function(a,c){typeof a=="string"&&(a=(c?c.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)}; -CKEDITOR.dom.element.get=function(a){return(a=typeof a=="string"?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,c){var b=new CKEDITOR.dom.element("div",c);b.setHtml(a);return b.getFirst().remove()}; -CKEDITOR.dom.element.setMarker=function(a,c,b,f){var e=c.getCustomData("list_marker_id")||c.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),d=c.getCustomData("list_marker_names")||c.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[e]=c;d[b]=1;return c.setCustomData(b,f)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var c in a)CKEDITOR.dom.element.clearMarkers(a,a[c],1)}; -CKEDITOR.dom.element.clearMarkers=function(a,c,b){var f=c.getCustomData("list_marker_names"),e=c.getCustomData("list_marker_id"),d;for(d in f)c.removeCustomData(d);c.removeCustomData("list_marker_names");if(b){c.removeCustomData("list_marker_id");delete a[e]}}; -(function(){function a(b){for(var a=0,e=0,d=c[b].length;e]*>/g, -""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(true));return b.innerHTML},getClientRect:function(){var b=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return b},setHtml:function(){var b=function(b){return this.$.innerHTML=b};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(b){try{return this.$.innerHTML= -b}catch(a){this.$.innerHTML="";var c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=b;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return b}}:b}(),setText:function(b){CKEDITOR.dom.element.prototype.setText=this.$.innerText!=void 0?function(b){return this.$.innerText=b}:function(b){return this.$.textContent=b};return this.setText(b)},getAttribute:function(){var b=function(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)? -function(b){switch(b){case "class":b="className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":b=this.$.getAttribute(b,2);b!==0&&this.$.tabIndex===0&&(b=null);return b;case "checked":b=this.$.attributes.getNamedItem(b);return(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified? -this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(b,2)}:b}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(b){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]}:function(b){var a=this.getWindow().$.getComputedStyle(this.$,null);return a?a.getPropertyValue(b):""},getDtd:function(){var b=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return b};return b},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag, -getTabIndex:CKEDITOR.env.ie?function(){var b=this.$.tabIndex;b===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(b=-1);return b}:CKEDITOR.env.webkit?function(){var b=this.$.tabIndex;if(b==void 0){b=parseInt(this.getAttribute("tabindex"),10);isNaN(b)&&(b=-1)}return b}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id|| -null},getNameAtt:function(){return this.$.name||null},getName:function(){var b=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var a=this.$.scopeName;a!="HTML"&&(b=a.toLowerCase()+":"+b)}return(this.getName=function(){return b})()},getValue:function(){return this.$.value},getFirst:function(b){var a=this.$.firstChild;(a=a&&new CKEDITOR.dom.node(a))&&(b&&!b(a))&&(a=a.getNext(b));return a},getLast:function(b){var a=this.$.lastChild;(a=a&&new CKEDITOR.dom.node(a))&&(b&&!b(a))&& -(a=a.getPrevious(b));return a},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]},is:function(){var b=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][b];for(var a=0;a0&&(a>2||!c[b[0].nodeName]||a==2&&!c[b[1].nodeName])},hasAttribute:function(){function b(b){b=this.$.attributes.getNamedItem(b); -return!(!b||!b.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(a){return a=="name"?!!this.$.name:b.call(this,a)}:b}(),hide:function(){this.setStyle("display","none")},moveChildren:function(b,a){var c=this.$,b=b.$;if(c!=b){var d;if(a)for(;d=c.lastChild;)b.insertBefore(c.removeChild(d),b.firstChild);else for(;d=c.firstChild;)b.appendChild(c.removeChild(d))}},mergeSiblings:function(){function b(b,a,c){if(a&&a.type==CKEDITOR.NODE_ELEMENT){for(var j=[];a.data("cke-bookmark")||a.isEmptyInlineRemoveable();){j.push(a); -a=c?a.getNext():a.getPrevious();if(!a||a.type!=CKEDITOR.NODE_ELEMENT)return}if(b.isIdentical(a)){for(var l=c?b.getLast():b.getFirst();j.length;)j.shift().move(b,!c);a.moveChildren(b,!c);a.remove();l&&l.type==CKEDITOR.NODE_ELEMENT&&l.mergeSiblings()}}}return function(a){if(a===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){b(this,this.getNext(),true);b(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var b=function(b, -a){this.$.setAttribute(b,a);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a,c){a=="class"?this.$.className=c:a=="style"?this.$.style.cssText=c:a=="tabindex"?this.$.tabIndex=c:a=="checked"?this.$.checked=c:a=="contenteditable"?b.call(this,"contentEditable",c):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(a,c){if(a=="src"&&c.match(/^http:\/\//))try{b.apply(this,arguments)}catch(d){}else b.apply(this,arguments); -return this}:b}(),setAttributes:function(b){for(var a in b)this.setAttribute(a,b[a]);return this},setValue:function(b){this.$.value=b;return this},removeAttribute:function(){var b=function(b){this.$.removeAttribute(b)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(b){b=="class"?b="className":b=="tabindex"?b="tabIndex":b=="contenteditable"&&(b="contentEditable");this.$.removeAttribute(b)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var a=0;a< -b.length;a++)this.removeAttribute(b[a]);else for(a in b)b.hasOwnProperty(a)&&this.removeAttribute(a)},removeStyle:function(b){var a=this.$.style;if(!a.removeProperty&&(b=="border"||b=="margin"||b=="padding")){var c=["top","left","right","bottom"],d;b=="border"&&(d=["color","style","width"]);for(var a=[],j=0;j=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+b+")")}else this.setStyle("opacity",b)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", -"none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var b,a=this.getElementsByTag("*"),c=0,d=a.count();c0)m(0,a===true?i:a===false?j:i<0?i:j);if(c&&(l<0||d>0))m(l<0?l:d,0)},setState:function(b,a,c){a=a||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(a+"_on");this.removeClass(a+"_off");this.removeClass(a+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled"); -break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(a+"_disabled");this.removeClass(a+"_off");this.removeClass(a+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(a+"_off");this.removeClass(a+"_on");this.removeClass(a+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(a){b.src=b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)}, -copyAttributes:function(b,a){for(var c=this.$.attributes,a=a||{},d=0;d=0&&a0&&c;)c=b(c,a.shift());else c=b(c,a);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu", -function(b){b.data.getTarget().hasClass("cke_enable_context_menu")||b.data.preventDefault()})},getDirection:function(b){return b?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(b,a){b="data-"+b;if(a===void 0)return this.getAttribute(b);a===false?this.removeAttribute(b):this.setAttribute(b,a);return null},getEditor:function(){var b=CKEDITOR.instances, -a,c;for(a in b){c=b[a];if(c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null}});var c={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(b,c,e){if(typeof c=="number"){if(e&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-a.call(this,b);this.setStyle(b,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(b, -c){var e=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(b)],this.$["client"+CKEDITOR.tools.capitalize(b)])||0;c&&(e=e-a.call(this,b));return e}})();CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a}; -CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}); -(function(){function a(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var d,n=c.startContainer;d=c.endContainer;var r=c.startOffset,p=c.endOffset,g,h=this.guard,u=this.type,f=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var k=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),e=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(p):d.getNext();this._.guardLTR=function(a,b){return(!b||!k.equals(a))&&(!e|| -!a.equals(e))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var F=n.type==CKEDITOR.NODE_ELEMENT?n:n.getParent(),D=n.type==CKEDITOR.NODE_ELEMENT?r?n.getChild(r-1):null:n.getPrevious();this._.guardRTL=function(a,b){return(!b||!F.equals(a))&&(!D||!a.equals(D))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var B=a?this._.guardRTL:this._.guardLTR;g=h?function(a,b){return B(a,b)===false?false:h(a,b)}:B;if(this.current)d=this.current[f](false,u,g);else{if(a)d.type== -CKEDITOR.NODE_ELEMENT&&(d=p>0?d.getChild(p-1):g(d,true)===false?null:d.getPreviousSourceNode(true,u,g));else{d=n;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(r)))d=g(n,true)===false?null:n.getNextSourceNode(true,u,g)}d&&g(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[f](false,u,g)}this.end();return this.current=null}function c(b){for(var c,d=null;c=a.call(this,b);)d=c;return d} -CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return a.call(this,0,1)!==false},checkBackward:function(){return a.call(this,1,1)!==false},lastForward:function(){return c.call(this)},lastBackward:function(){return c.call(this,1)},reset:function(){delete this.current;this._={}}}});var b={block:1,"list-item":1,table:1,"table-row-group":1, -"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){a=a?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,a||{}):CKEDITOR.dtd.$block;return this.getComputedStyle("float")=="none"&&b[this.getComputedStyle("display")]||a[this.getName()]};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary= -function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(d){var n,r;n=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(r=d.getParent())&&c(r);n=a?n:n||c(d);return!!(b^n)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible= -function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c=1;else{c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());c=!c.$.offsetHeight}return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!e(a)&&!d(a)}return function(c){var d=!CKEDITOR.env.ie?c.is&&c.is("br"):c.getText&&f.test(c.getText());if(d){d=c.getParent();c=c.getNext(b);d=d.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&& -c.isBlockBoundary())}return!!(a^d)}};var f=/^[\t\r\n ]*(?: |\xa0)$/,e=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(d(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty));return a&&(!CKEDITOR.env.ie?a.is&&a.is("br"):a.getText&&f.test(a.getText()))?a:false}})(); -CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var c=a instanceof CKEDITOR.dom.document;this.document=c?a:a.getDocument();this.root=c?a.getBody():a}; -(function(){function a(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),g=CKEDITOR.dom.walker.bogus();return function(h){if(c(h)||b(h))return true;if(g(h)&&!a)return a=true;return h.type==CKEDITOR.NODE_TEXT&&(h.hasAscendant("pre")||CKEDITOR.tools.trim(h.getText()).length)||h.type==CKEDITOR.NODE_ELEMENT&&!h.is(d)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(g){return c(g)||b(g)?true:!a&&j(g)|| -g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return!l(a)&&!i(a)}var f=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},e=function(a,b,c,g){a.optimizeBookmark();var h=a.startContainer,d=a.endContainer,f=a.startOffset,k=a.endOffset,e,j;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(k);else if(d.getChildCount()>0)if(k>=d.getChildCount()){d=d.append(a.document.createText(""));j=true}else d=d.getChild(k); -if(h.type==CKEDITOR.NODE_TEXT){h.split(f);h.equals(d)&&(d=h.getNext())}else if(f)if(f>=h.getChildCount()){h=h.append(a.document.createText(""));e=true}else h=h.getChild(f).getPrevious();else{h=h.append(a.document.createText(""),1);e=true}var f=h.getParents(),k=d.getParents(),l,i,q;for(l=0;l0&&!s.equals(d)&&(A=m.append(s.clone()));if(!f[c]||s.$.parentNode!=f[c].$.parentNode)for(s=s.getPrevious();s;){if(s.equals(f[c])||s.equals(h))break;v=s.getPrevious();if(b==2)m.$.insertBefore(s.$.cloneNode(true),m.$.firstChild);else{s.remove();b==1&&m.$.insertBefore(s.$,m.$.firstChild)}s=v}m&&(m=A)}if(b==2){i=a.startContainer;if(i.type==CKEDITOR.NODE_TEXT){i.$.data=i.$.data+i.$.nextSibling.data; -i.$.parentNode.removeChild(i.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(i&&q&&(h.$.parentNode!=i.$.parentNode||d.$.parentNode!=q.$.parentNode)){b=q.getIndex();e&&q.$.parentNode==h.$.parentNode&&b--;if(g&&i.type==CKEDITOR.NODE_ELEMENT){g=CKEDITOR.dom.element.createFromHtml(' ',a.document);g.insertAfter(i);i.mergeSiblings(false); -a.moveToBookmark({startNode:g})}else a.setStart(q.getParent(),b)}a.collapse(true)}e&&h.remove();j&&d.$.parentNode&&d.remove()},d={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},j=CKEDITOR.dom.walker.bogus(),l=new CKEDITOR.dom.walker.whitespaces,i=new CKEDITOR.dom.walker.bookmark,m=/^[\t\r\n ]*(?: |\xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root); -a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,2,a);return a},deleteContents:function(a){this.collapsed|| -e(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,1,b,a);return b},createBookmark:function(a){var b,c,g,h,d=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){g="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",g+(d?"C":"S"))}if(!d){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id",g+"E");h=this.clone();h.collapse();h.insertNode(c)}h= -this.clone();h.collapse(true);h.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?g+(d?"C":"S"):b,endNode:a?g+"E":c,serializable:a,collapsed:d}},createBookmark2:function(a){var b=this.startContainer,c=this.endContainer,g=this.startOffset,h=this.endOffset,d=this.collapsed,f,k;if(!b||!c)return{start:0,end:0};if(a){if(b.type==CKEDITOR.NODE_ELEMENT){if((f=b.getChild(g))&&f.type==CKEDITOR.NODE_TEXT&&g>0&&f.getPrevious().type== -CKEDITOR.NODE_TEXT){b=f;g=0}f&&f.type==CKEDITOR.NODE_ELEMENT&&(g=f.getIndex(1))}for(;b.type==CKEDITOR.NODE_TEXT&&(k=b.getPrevious())&&k.type==CKEDITOR.NODE_TEXT;){b=k;g=g+k.getLength()}if(!d){if(c.type==CKEDITOR.NODE_ELEMENT){if((f=c.getChild(h))&&f.type==CKEDITOR.NODE_TEXT&&h>0&&f.getPrevious().type==CKEDITOR.NODE_TEXT){c=f;h=0}f&&f.type==CKEDITOR.NODE_ELEMENT&&(h=f.getIndex(1))}for(;c.type==CKEDITOR.NODE_TEXT&&(k=c.getPrevious())&&k.type==CKEDITOR.NODE_TEXT;){c=k;h=h+k.getLength()}}}return{start:b.getAddress(a), -end:d?null:c.getAddress(a),startOffset:g,endOffset:h,normalized:a,collapsed:d,is2:true}},moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,g=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);g?this.setEnd(g,a):this.collapse(true)}else{b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a); -a.remove()}else this.collapse(true)}},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,g=this.endOffset,h;if(a.type==CKEDITOR.NODE_ELEMENT){h=a.getChildCount();if(h>c)a=a.getChild(c);else if(h<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){h=b.getChildCount();if(h>g)b=b.getChild(g).getPreviousSourceNode(true);else if(h<1)b=b.getPreviousSourceNode(); -else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,g=this.endContainer,c=c.equals(g)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(g);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>= +CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(b,c){b.append(this,c);return b},clone:function(b,c){var a=this.$.cloneNode(b),e=function(a){a["data-cke-expando"]&&(a["data-cke-expando"]=false);if(a.nodeType==CKEDITOR.NODE_ELEMENT){c||a.removeAttribute("id",false);if(b)for(var a=a.childNodes,d=0;d8)&&c)b=c+":"+b;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b= +b?new CKEDITOR.dom.element(b):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(b){this.$.open("text/html","replace");CKEDITOR.env.ie&&(b=b.replace(/(?:^\s*]*?>)|^/i,'$&\n