CKEDITOR.plugins.add("ipsautogrow",{init:function(b){b.on("instanceReady",function(){function e(){"desktop"===ips.utils.responsive.getCurrentKey()&&c.find(".cke_wysiwyg_div").css({maxHeight:$(window).height()-200+"px"})}var c=$("#cke_"+b.name).find("> div").first();$(c.parentNode);var d;ips.utils.responsive.getCurrentKey();var f=_.debounce(e,200);e();$(window).on("resize",f);b.on("beforeModeUnload",function(a){"wysiwyg"==a.editor.mode&&(d=c.height())});b.on("mode",function(a){"source"==a.editor.mode&&
(a=$("#cke_"+b.name).find("textarea.cke_source"),Debug.log(a),a.css({height:d+"px"}),document.all&&!parseInt(a.width())&&a.css({width:"100%"}))});b.on("beforeCommandExec",function(a){"maximize"==a.data.name&&"source"==a.editor.mode?$("#cke_"+b.name).find("textarea.cke_source").css({height:d+"px"}):"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(d=c.height())})})}});