(function(){CKEDITOR.plugins.add("gpautogrow",{init:function(g){for(var i in{contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1})g.on(i,function(e){var h=g.getCommand("maximize");h&&h.state==CKEDITOR.TRISTATE_ON||("source"==e.editor.mode&&window.setTimeout(function(){var b=e.editor,a=b.textarea.$,d=b.config.autoGrow_minHeight||20,c=!($.browser.msie||$.browser.opera),b=a.value.length,f=a.offsetWidth;if(b!=a.valLength||f!=a.boxWidth){if(c&&(b<a.valLength||f!=a.boxWidth))a.style.height="0px";
d=Math.max(d,a.scrollHeight);c=$(a).height();d!=c&&(a.style.overflow=a.scrollHeight>d?"auto":"hidden",a.style.height=d+"px",a.valLength=b,a.boxWidth=f,$(a).closest(".cke_contents").height(d))}},100),"wysiwyg"==e.editor.mode&&window.setTimeout(function(){var b=e.editor,a=b.document,d=b.window.getViewPaneSize().height;b.window.getViewPaneSize();var c;c=$(a.$.body).outerHeight(!0);$(a.$).width();c=Math.max(c,b.config.autoGrow_minHeight||200);c!=d&&(b.window.$.scrollTo(0,0),c=b.fire("autoGrow",{currentHeight:d,
newHeight:c}).newHeight,b.resize(b.container.getStyle("width"),c,!0))},100))})}})})();