CKEDITOR.plugins.add('resize',{init:function(a){var b=a.config;if(b.resize_enabled){var c=null,d,e,f=(b.resize_dir=='both'||b.resize_dir=='horizontal')&&b.resize_minWidth!=b.resize_maxWidth,g=(b.resize_dir=='both'||b.resize_dir=='vertical')&&b.resize_minHeight!=b.resize_maxHeight;function h(k){var l=k.data.$.screenX-d.x,m=k.data.$.screenY-d.y,n=e.width,o=e.height,p=n+l*(a.lang.dir=='rtl'?-1:1),q=o+m;if(f)n=Math.max(b.resize_minWidth,Math.min(p,b.resize_maxWidth));if(g)o=Math.max(b.resize_minHeight,Math.min(q,b.resize_maxHeight));a.resize(n,o);if(a.config.resize_event)a.fire('resizeProgress');};function i(k){CKEDITOR.document.removeListener('mousemove',h);CKEDITOR.document.removeListener('mouseup',i);if(a.document){a.document.removeListener('mousemove',h);a.document.removeListener('mouseup',i);}if(a.config.resize_event)a.fire('resizeComplete');};var j=CKEDITOR.tools.addFunction(function(k){if(!c)c=a.getResizable();e={width:c.$.offsetWidth||0,height:c.$.offsetHeight||0};d={x:k.screenX,y:k.screenY};CKEDITOR.document.on('mousemove',h);CKEDITOR.document.on('mouseup',i);if(a.document){a.document.on('mousemove',h);a.document.on('mouseup',i);}if(a.config.resize_event)a.fire('resizeStart');});a.on('destroy',function(){CKEDITOR.tools.removeFunction(j);});a.on('themeSpace',function(k){if(k.data.space=='bottom'){var l='';if(f&&!g)l=' cke_resizer_horizontal';if(!f&&g)l=' cke_resizer_vertical';k.data.html+='<div class="cke_resizer'+l+'"'+' title="'+CKEDITOR.tools.htmlEncode(a.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+j+', event)"'+'></div>';}},a,null,100);}}});CKEDITOR.config.resize_minWidth=750;CKEDITOR.config.resize_minHeight=250;CKEDITOR.config.resize_maxWidth=3000;CKEDITOR.config.resize_maxHeight=3000;CKEDITOR.config.resize_enabled=true;CKEDITOR.config.resize_dir='both';CKEDITOR.config.resize_event=false;
