All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.uoatinymce.tinymce.plugins.fullscreen.plugin.min.js Maven / Gradle / Ivy

There is a newer version: 1.2
Show newest version
tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,o=i.body;return o.offsetWidth&&(e=o.offsetWidth,t=o.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){l.setStyle(c,"height",t().h-(s.clientHeight-c.clientHeight))}var s,c,u,d=document.body,m=document.documentElement;r=!r,s=e.getContainer().firstChild,c=e.getContentAreaContainer().firstChild,u=c.style,r?(i=u.width,o=u.height,u.width=u.height="100%",l.addClass(d,"mce-fullscreen"),l.addClass(m,"mce-fullscreen"),l.addClass(s,"mce-fullscreen"),l.bind(window,"resize",n),n(),a=n):(u.width=i,u.height=o,l.removeClass(d,"mce-fullscreen"),l.removeClass(m,"mce-fullscreen"),l.removeClass(s,"mce-fullscreen"),l.unbind(window,"resize",a)),e.fire("FullscreenStateChanged",{state:r})}var i,o,a,r=!1,l=tinymce.DOM;if(!e.settings.inline)return e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){a&&l.unbind(window,"resize",a)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return r}}});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy