| 980 | function(c){/data-cke-widget/.test(c.data)&&(e=1);a.destroyAll(!0)},null,null,9);c.on("paste",function(a){a.data.dataValue=a.data.dataValue.replace(X,W)});c.on("insertText",b,null,null,999);c.on("insertHtml",b,null,null,999)}function C(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,i;a.editor.fire("lockSnapshot"); |
| 981 | for(f&&(g=a.focused)&&t(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(i=g.editor.checkDirty(),g.setSelected(!1),!i&&g.editor.resetDirty());f&&e&&(i=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!i&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function D(a,b,c){var d=0,b=E(b),e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f], |
| 982 | d=1);d&&a.setData("classes",e)}}function F(a){a.cancel()}function B(a,b){var c=a.editor,d=c.document;if(!d.getById("cke_copybin")){var e=c.blockless||CKEDITOR.env.ie?"span":"div",f=d.createElement(e),g=d.createElement(e),e=CKEDITOR.env.ie&&9>CKEDITOR.env.version;g.setAttributes({id:"cke_copybin","data-cke-temp":"1"});f.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});f.setStyle("ltr"==c.config.contentsLangDirection?"left":"right","-5000px");f.setHtml('<span data-cke-copybin-start="1"></span>'+ |
| 983 | a.wrapper.getOuterHtml()+'<span data-cke-copybin-end="1"></span>');c.fire("saveSnapshot");c.fire("lockSnapshot");g.append(f);c.editable().append(g);var i=c.on("selectionChange",F,null,null,0),h=a.repository.on("checkSelection",F,null,null,0);if(e)var j=d.getDocumentElement().$,k=j.scrollTop;d=c.createRange();d.selectNodeContents(f);d.select();e&&(j.scrollTop=k);setTimeout(function(){b||a.focus();g.remove();i.removeListener();h.removeListener();c.fire("unlockSnapshot");if(b){a.repository.del(a);c.fire("saveSnapshot")}}, |
| 984 | 100)}}function E(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function G(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function H(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function Y(a){var b=null;a.on("data",function(){var a=this.data.classes,d;if(b!=a){for(d in b)(!a|| |
| 985 | !a[d])&&this.removeClass(d);for(d in a)this.addClass(d);b=a}})}function Z(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(U),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png)"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1", |