diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-01-20 18:46:28 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-01-20 18:46:28 +0100 |
commit | 6fa5b437a48485927e5d90abe061ee723f3b45c2 (patch) | |
tree | 118a32ddde4af92c7def9838b10beddb9f0fe241 /program/js/tinymce/plugins/fullscreen | |
parent | fac59dc441d25f7204fb6013bf88db90c01ae34b (diff) |
Update to TinyMCE 4.x
Diffstat (limited to 'program/js/tinymce/plugins/fullscreen')
-rw-r--r-- | program/js/tinymce/plugins/fullscreen/plugin.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/program/js/tinymce/plugins/fullscreen/plugin.min.js b/program/js/tinymce/plugins/fullscreen/plugin.min.js new file mode 100644 index 000000000..1bb1940dd --- /dev/null +++ b/program/js/tinymce/plugins/fullscreen/plugin.min.js @@ -0,0 +1 @@ +tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,l=i.body;return l.offsetWidth&&(e=l.offsetWidth,t=l.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){d.setStyle(a,"height",t().h-(h.clientHeight-a.clientHeight))}var u,h,a,f,m=document.body,g=document.documentElement;s=!s,h=e.getContainer(),u=h.style,a=e.getContentAreaContainer().firstChild,f=a.style,s?(i=f.width,l=f.height,f.width=f.height="100%",c=u.width,o=u.height,u.width=u.height="",d.addClass(m,"mce-fullscreen"),d.addClass(g,"mce-fullscreen"),d.addClass(h,"mce-fullscreen"),d.bind(window,"resize",n),n(),r=n):(f.width=i,f.height=l,c&&(u.width=c),o&&(u.height=o),d.removeClass(m,"mce-fullscreen"),d.removeClass(g,"mce-fullscreen"),d.removeClass(h,"mce-fullscreen"),d.unbind(window,"resize",r)),e.fire("FullscreenStateChanged",{state:s})}var i,l,r,c,o,s=!1,d=tinymce.DOM;return e.settings.inline?void 0:(e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){r&&d.unbind(window,"resize",r)}),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 s}})});
\ No newline at end of file |