1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 22:59:43 +02:00

Update TinyMCE to v4.7.5

Resolves Codesample inline editing glitch.
This commit is contained in:
sauls8t 2018-01-23 12:34:43 +00:00
parent 4c80b8877d
commit 88b99979a9
90 changed files with 186 additions and 77 deletions

2
gui/public/tinymce/plugins/fullscreen/plugin.min.js vendored Normal file → Executable file
View file

@ -1 +1 @@
!function(){"use strict";var e=function(n){var t=n,i=function(){return t};return{get:i,set:function(e){t=e},clone:function(){return e(i())}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},i=function(e,n){e.fire("FullscreenStateChanged",{state:n})},r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils").DOM,o=function(e,n){var t,o,l,c,u=document.body,s=document.documentElement,d=n.get(),a=function(){r.setStyle(l,"height",function(){var e,n,t=window,i=document.body;return i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}}().h-(o.clientHeight-l.clientHeight))},h=function(){r.unbind(window,"resize",a)};if(o=e.getContainer(),t=o.style,l=e.getContentAreaContainer().firstChild,c=l.style,d)c.width=d.iframeWidth,c.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),r.removeClass(u,"mce-fullscreen"),r.removeClass(s,"mce-fullscreen"),r.removeClass(o,"mce-fullscreen"),function(e){window.scrollTo(e.x,e.y)}(d.scrollPos),r.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),i(e,!1);else{var f={scrollPos:function(){var e=r.getViewPort();return{x:e.x,y:e.y}}(),containerWidth:t.width,containerHeight:t.height,iframeWidth:c.width,iframeHeight:c.height,resizeHandler:a,removeHandler:h};c.width=c.height="100%",t.width=t.height="",r.addClass(u,"mce-fullscreen"),r.addClass(s,"mce-fullscreen"),r.addClass(o,"mce-fullscreen"),r.bind(window,"resize",a),e.on("remove",h),a(),n.set(f),i(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){o(e,n)})},c=function(e){return function(n){var t=n.control;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}},u=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:c(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:c(e)})};n.add("fullscreen",function(n){var i=e(null);return l(n,i),u(n),n.addShortcut("Ctrl+Shift+F","","mceFullScreen"),t(i)})}();
!function(){"use strict";var e=function(t){var n=t,i=function(){return n};return{get:i,set:function(e){n=e},clone:function(){return e(i())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isFullscreen:function(){return null!==e.get()}}},i=function(e,t){e.fire("FullscreenStateChanged",{state:t})},r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils").DOM,l=function(e,t){var n,l,o,c,s,u,d=document.body,a=document.documentElement,h=t.get(),f=function(){var e,t,n,i;r.setStyle(o,"height",(n=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,t=i.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}).h-(l.clientHeight-o.clientHeight))},m=function(){r.unbind(window,"resize",f)};if(n=(l=e.getContainer()).style,c=(o=e.getContentAreaContainer().firstChild).style,h)c.width=h.iframeWidth,c.height=h.iframeHeight,h.containerWidth&&(n.width=h.containerWidth),h.containerHeight&&(n.height=h.containerHeight),r.removeClass(d,"mce-fullscreen"),r.removeClass(a,"mce-fullscreen"),r.removeClass(l,"mce-fullscreen"),s=h.scrollPos,window.scrollTo(s.x,s.y),r.unbind(window,"resize",h.resizeHandler),e.off("remove",h.removeHandler),t.set(null),i(e,!1);else{var g={scrollPos:(u=r.getViewPort(),{x:u.x,y:u.y}),containerWidth:n.width,containerHeight:n.height,iframeWidth:c.width,iframeHeight:c.height,resizeHandler:f,removeHandler:m};c.width=c.height="100%",n.width=n.height="",r.addClass(d,"mce-fullscreen"),r.addClass(a,"mce-fullscreen"),r.addClass(l,"mce-fullscreen"),r.bind(window,"resize",f),e.on("remove",m),f(),t.set(g),i(e,!0)}},o=function(e,t){e.addCommand("mceFullScreen",function(){l(e,t)})},c=function(e){return function(t){var n=t.control;e.on("FullscreenStateChanged",function(e){n.active(e.state)})}},s=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:c(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:c(e)})};t.add("fullscreen",function(t){var i=e(null);return o(t,i),s(t),t.addShortcut("Ctrl+Shift+F","","mceFullScreen"),n(i)})}();