tinymce.create("tinymce.plugins.wpFullscreenPlugin",{resize_timeout:!1,init:function(s){var l=this,t={},e=tinymce.DOM;function n(e,n){var t=tinymce.DOM,o=s.getBody(),i=t.get(s.id+"_ifr"),c=s.dom.win.scrollY;l.resize_timeout||(l.resize_timeout=!0,setTimeout(function(){l.resize_timeout=!1},500),(o=300<o.scrollHeight?o.scrollHeight:300)!=i.scrollHeight&&(t.setStyle(i,"height",o+"px"),s.getWin().scrollTo(0,0)),n&&"paste"==n.type&&tinymce.isWebKit&&setTimeout(function(){s.dom.win.scrollTo(0,c)},40))}s.addCommand("wpFullScreenClose",function(){s.getParam("wp_fullscreen_is_enabled")&&e.win.setTimeout(function(){tinymce.remove(s),e.remove("wp_mce_fullscreen_parent"),tinymce.settings=tinymce.oldSettings},10)}),s.addCommand("wpFullScreenSave",function(){var e=tinymce.get("wp_mce_fullscreen");e.focus(),tinymce.get(e.getParam("wp_fullscreen_editor_id")).setContent(e.getContent({format:"raw"}),{format:"raw"})}),s.addCommand("wpFullScreenInit",function(){var e=(s=tinymce.activeEditor).getDoc().body;tinymce.oldSettings=tinymce.settings,tinymce.each(s.settings,function(e,n){t[n]=e}),t.id="wp_mce_fullscreen",t.wp_fullscreen_is_enabled=!0,t.wp_fullscreen_editor_id=s.id,t.theme_advanced_resizing=!1,t.theme_advanced_statusbar_location="none",t.content_css=t.content_css?t.content_css+","+t.wp_fullscreen_content_css:t.wp_fullscreen_content_css,t.height=tinymce.isIE?e.scrollHeight:e.offsetHeight,tinymce.each(s.getParam("wp_fullscreen_settings"),function(e,n){t[n]=e}),(e=new tinymce.Editor("wp_mce_fullscreen",t)).onInit.add(function(e){var o=tinymce.DOM,n=o.select("a.mceButton",o.get("wp-fullscreen-buttons"));s.isHidden()?e.setContent(switchEditors.wpautop(e.getElement().value)):e.setContent(s.getContent()),setTimeout(function(){e.onNodeChange.add(function(){tinymce.each(n,function(e){var n,t;(n=o.get("wp_mce_fullscreen_"+e.id.substr(6)))&&(t=n.className)&&(e.className=t)})})},1e3),e.dom.addClass(e.getBody(),"wp-fullscreen-editor"),e.focus()}),e.render(),"undefined"!=fullscreen&&e.dom.bind(e.dom.doc,"mousemove",function(e){fullscreen.bounder("showToolbar","hideToolbar",2e3,e)})}),s.addCommand("wpFullScreen",function(){"undefined"!=typeof fullscreen&&("wp_mce_fullscreen"==s.id?fullscreen.off():fullscreen.on())}),s.addButton("wp_fullscreen",{title:"wordpress.wp_fullscreen_desc",cmd:"wpFullScreen"}),!s.getParam("fullscreen_is_enabled")&&s.getParam("wp_fullscreen_is_enabled")&&(s.onInit.add(function(e){e.onChange.add(n),e.onSetContent.add(n),e.onPaste.add(n),e.onKeyUp.add(n),e.onPostRender.add(n),e.getBody().style.overflowY="hidden"}),s.getParam("autoresize_on_init",!0)&&s.onLoadContent.add(function(){setTimeout(function(){n()},1200)}),s.addCommand("wpAutoResize",n))},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}}),tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin);