agenda-libre-ruby/public/assets/tinymce/plugins/fullscreen/plugin-d733f3e4064d70e78359...

11 lines
2.2 KiB
JavaScript

/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.0.9 (2019-06-26)
*/
!function(d){"use strict";var i=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return i(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isFullscreen:function(){return null!==e.get()}}},t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=function(e,t){e.fire("FullscreenStateChanged",{state:t})},h=t.DOM,r=function(e,t){var n,i,r,l,o,c=d.document.body,u=d.document.documentElement,s=t.get();if(n=(i=e.getContainer()).style,r=e.getContentAreaContainer().firstChild.style,s)r.width=s.iframeWidth,r.height=s.iframeHeight,s.containerWidth&&(n.width=s.containerWidth),s.containerHeight&&(n.height=s.containerHeight),h.removeClass(c,"tox-fullscreen"),h.removeClass(u,"tox-fullscreen"),h.removeClass(i,"tox-fullscreen"),l=s.scrollPos,d.window.scrollTo(l.x,l.y),t.set(null),f(e,!1);else{var a={scrollPos:(o=h.getViewPort(),{x:o.x,y:o.y}),containerWidth:n.width,containerHeight:n.height,iframeWidth:r.width,iframeHeight:r.height};r.width=r.height="100%",n.width=n.height="",h.addClass(c,"tox-fullscreen"),h.addClass(u,"tox-fullscreen"),h.addClass(i,"tox-fullscreen"),t.set(a),f(e,!0)}},l=function(e,t){e.addCommand("mceFullScreen",function(){r(e,t)})},o=function(n,i){return function(t){t.setActive(null!==i.get());var e=function(e){return t.setActive(e.state)};return n.on("FullscreenStateChanged",e),function(){return n.off("FullscreenStateChanged",e)}}},c=function(e,t){e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return e.execCommand("mceFullScreen")},onSetup:o(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return e.execCommand("mceFullScreen")},onSetup:o(e,t)})};!function u(){e.add("fullscreen",function(e){var t=i(null);return e.settings.inline||(l(e,t),c(e,t),e.addShortcut("Meta+Shift+F","","mceFullScreen")),n(t)})}()}(window);