Update TinyMCE to 4.9.4. Changelog: https://github.com/tinymce/tinymce/blob/4.x/changelog.txt.
Props parkcityj, azaozz. Merges [45316] to the 5.2 branch. Fixes #47229 #47205. Built from https://develop.svn.wordpress.org/branches/5.2@45343 git-svn-id: http://core.svn.wordpress.org/branches/5.2@45154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7b594da461
commit
6ba2cde3a3
|
@ -1,5 +1,5 @@
|
||||||
(function () {
|
(function () {
|
||||||
var fullscreen = (function () {
|
var fullscreen = (function (domGlobals) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Cell = function (initial) {
|
var Cell = function (initial) {
|
||||||
|
@ -42,8 +42,8 @@ var fullscreen = (function () {
|
||||||
var getWindowSize = function () {
|
var getWindowSize = function () {
|
||||||
var w;
|
var w;
|
||||||
var h;
|
var h;
|
||||||
var win = window;
|
var win = domGlobals.window;
|
||||||
var doc = document;
|
var doc = domGlobals.document;
|
||||||
var body = doc.body;
|
var body = doc.body;
|
||||||
if (body.offsetWidth) {
|
if (body.offsetWidth) {
|
||||||
w = body.offsetWidth;
|
w = body.offsetWidth;
|
||||||
|
@ -66,11 +66,11 @@ var fullscreen = (function () {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var setScrollPos = function (pos) {
|
var setScrollPos = function (pos) {
|
||||||
window.scrollTo(pos.x, pos.y);
|
domGlobals.window.scrollTo(pos.x, pos.y);
|
||||||
};
|
};
|
||||||
var toggleFullscreen = function (editor, fullscreenState) {
|
var toggleFullscreen = function (editor, fullscreenState) {
|
||||||
var body = document.body;
|
var body = domGlobals.document.body;
|
||||||
var documentElement = document.documentElement;
|
var documentElement = domGlobals.document.documentElement;
|
||||||
var editorContainerStyle;
|
var editorContainerStyle;
|
||||||
var editorContainer, iframe, iframeStyle;
|
var editorContainer, iframe, iframeStyle;
|
||||||
var fullscreenInfo = fullscreenState.get();
|
var fullscreenInfo = fullscreenState.get();
|
||||||
|
@ -78,7 +78,7 @@ var fullscreen = (function () {
|
||||||
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
|
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
|
||||||
};
|
};
|
||||||
var removeResize = function () {
|
var removeResize = function () {
|
||||||
DOM.unbind(window, 'resize', resize);
|
DOM.unbind(domGlobals.window, 'resize', resize);
|
||||||
};
|
};
|
||||||
editorContainer = editor.getContainer();
|
editorContainer = editor.getContainer();
|
||||||
editorContainerStyle = editorContainer.style;
|
editorContainerStyle = editorContainer.style;
|
||||||
|
@ -99,7 +99,7 @@ var fullscreen = (function () {
|
||||||
DOM.addClass(body, 'mce-fullscreen');
|
DOM.addClass(body, 'mce-fullscreen');
|
||||||
DOM.addClass(documentElement, 'mce-fullscreen');
|
DOM.addClass(documentElement, 'mce-fullscreen');
|
||||||
DOM.addClass(editorContainer, 'mce-fullscreen');
|
DOM.addClass(editorContainer, 'mce-fullscreen');
|
||||||
DOM.bind(window, 'resize', resize);
|
DOM.bind(domGlobals.window, 'resize', resize);
|
||||||
editor.on('remove', removeResize);
|
editor.on('remove', removeResize);
|
||||||
resize();
|
resize();
|
||||||
fullscreenState.set(newFullScreenInfo);
|
fullscreenState.set(newFullScreenInfo);
|
||||||
|
@ -117,7 +117,7 @@ var fullscreen = (function () {
|
||||||
DOM.removeClass(documentElement, 'mce-fullscreen');
|
DOM.removeClass(documentElement, 'mce-fullscreen');
|
||||||
DOM.removeClass(editorContainer, 'mce-fullscreen');
|
DOM.removeClass(editorContainer, 'mce-fullscreen');
|
||||||
setScrollPos(fullscreenInfo.scrollPos);
|
setScrollPos(fullscreenInfo.scrollPos);
|
||||||
DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler);
|
DOM.unbind(domGlobals.window, 'resize', fullscreenInfo.resizeHandler);
|
||||||
editor.off('remove', fullscreenInfo.removeHandler);
|
editor.off('remove', fullscreenInfo.removeHandler);
|
||||||
fullscreenState.set(null);
|
fullscreenState.set(null);
|
||||||
Events.fireFullscreenStateChanged(editor, false);
|
Events.fireFullscreenStateChanged(editor, false);
|
||||||
|
@ -173,5 +173,5 @@ var fullscreen = (function () {
|
||||||
|
|
||||||
return Plugin;
|
return Plugin;
|
||||||
|
|
||||||
}());
|
}(window));
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
!function(){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=function(e,n){e.fire("FullscreenStateChanged",{state:n})},g=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=document.body,u=document.documentElement,d=n.get(),a=function(){var e,n,t,i;g.setStyle(l,"height",(t=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){g.unbind(window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),g.removeClass(s,"mce-fullscreen"),g.removeClass(u,"mce-fullscreen"),g.removeClass(r,"mce-fullscreen"),o=d.scrollPos,window.scrollTo(o.x,o.y),g.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),m(e,!1);else{var f={scrollPos:(c=g.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",g.addClass(s,"mce-fullscreen"),g.addClass(u,"mce-fullscreen"),g.addClass(r,"mce-fullscreen"),g.bind(window,"resize",a),e.on("remove",h),a(),n.set(f),m(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}();
|
!function(m){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e,n){e.fire("FullscreenStateChanged",{state:n})},w=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=m.document.body,u=m.document.documentElement,d=n.get(),a=function(){var e,n,t,i;w.setStyle(l,"height",(t=m.window,i=m.document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){w.unbind(m.window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),w.removeClass(s,"mce-fullscreen"),w.removeClass(u,"mce-fullscreen"),w.removeClass(r,"mce-fullscreen"),o=d.scrollPos,m.window.scrollTo(o.x,o.y),w.unbind(m.window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),g(e,!1);else{var f={scrollPos:(c=w.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",w.addClass(s,"mce-fullscreen"),w.addClass(u,"mce-fullscreen"),w.addClass(r,"mce-fullscreen"),w.bind(m.window,"resize",a),e.on("remove",h),a(),n.set(f),g(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}(window);
|
|
@ -1,5 +1,5 @@
|
||||||
(function () {
|
(function () {
|
||||||
var image = (function () {
|
var image = (function (domGlobals) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||||
|
@ -63,7 +63,7 @@ var image = (function () {
|
||||||
getUploadCredentials: getUploadCredentials
|
getUploadCredentials: getUploadCredentials
|
||||||
};
|
};
|
||||||
|
|
||||||
var Global = typeof window !== 'undefined' ? window : Function('return this;')();
|
var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
|
||||||
|
|
||||||
var path = function (parts, scope) {
|
var path = function (parts, scope) {
|
||||||
var o = scope !== undefined && scope !== null ? scope : Global;
|
var o = scope !== undefined && scope !== null ? scope : Global;
|
||||||
|
@ -102,7 +102,7 @@ var image = (function () {
|
||||||
return Math.max(parseInt(val1, 10), parseInt(val2, 10));
|
return Math.max(parseInt(val1, 10), parseInt(val2, 10));
|
||||||
};
|
};
|
||||||
var getImageSize = function (url, callback) {
|
var getImageSize = function (url, callback) {
|
||||||
var img = document.createElement('img');
|
var img = domGlobals.document.createElement('img');
|
||||||
function done(width, height) {
|
function done(width, height) {
|
||||||
if (img.parentNode) {
|
if (img.parentNode) {
|
||||||
img.parentNode.removeChild(img);
|
img.parentNode.removeChild(img);
|
||||||
|
@ -125,7 +125,7 @@ var image = (function () {
|
||||||
style.position = 'fixed';
|
style.position = 'fixed';
|
||||||
style.bottom = style.left = '0px';
|
style.bottom = style.left = '0px';
|
||||||
style.width = style.height = 'auto';
|
style.width = style.height = 'auto';
|
||||||
document.body.appendChild(img);
|
domGlobals.document.body.appendChild(img);
|
||||||
img.src = url;
|
img.src = url;
|
||||||
};
|
};
|
||||||
var buildListItems = function (inputList, itemCallback, startItems) {
|
var buildListItems = function (inputList, itemCallback, startItems) {
|
||||||
|
@ -294,21 +294,21 @@ var image = (function () {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var getAttrib = function (image, name$$1) {
|
var getAttrib = function (image, name) {
|
||||||
if (image.hasAttribute(name$$1)) {
|
if (image.hasAttribute(name)) {
|
||||||
return image.getAttribute(name$$1);
|
return image.getAttribute(name);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var getStyle = function (image, name$$1) {
|
var getStyle = function (image, name) {
|
||||||
return image.style[name$$1] ? image.style[name$$1] : '';
|
return image.style[name] ? image.style[name] : '';
|
||||||
};
|
};
|
||||||
var hasCaption = function (image) {
|
var hasCaption = function (image) {
|
||||||
return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
|
return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
|
||||||
};
|
};
|
||||||
var setAttrib = function (image, name$$1, value) {
|
var setAttrib = function (image, name, value) {
|
||||||
image.setAttribute(name$$1, value);
|
image.setAttribute(name, value);
|
||||||
};
|
};
|
||||||
var wrapInFigure = function (image) {
|
var wrapInFigure = function (image) {
|
||||||
var figureElm = DOM.create('figure', { class: 'image' });
|
var figureElm = DOM.create('figure', { class: 'image' });
|
||||||
|
@ -339,21 +339,21 @@ var image = (function () {
|
||||||
image.removeAttribute('style');
|
image.removeAttribute('style');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var setSize = function (name$$1, normalizeCss) {
|
var setSize = function (name, normalizeCss) {
|
||||||
return function (image, name$$1, value) {
|
return function (image, name, value) {
|
||||||
if (image.style[name$$1]) {
|
if (image.style[name]) {
|
||||||
image.style[name$$1] = Utils.addPixelSuffix(value);
|
image.style[name] = Utils.addPixelSuffix(value);
|
||||||
normalizeStyle(image, normalizeCss);
|
normalizeStyle(image, normalizeCss);
|
||||||
} else {
|
} else {
|
||||||
setAttrib(image, name$$1, value);
|
setAttrib(image, name, value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var getSize = function (image, name$$1) {
|
var getSize = function (image, name) {
|
||||||
if (image.style[name$$1]) {
|
if (image.style[name]) {
|
||||||
return Utils.removePixelSuffix(image.style[name$$1]);
|
return Utils.removePixelSuffix(image.style[name]);
|
||||||
} else {
|
} else {
|
||||||
return getAttrib(image, name$$1);
|
return getAttrib(image, name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var setHspace = function (image, value) {
|
var setHspace = function (image, value) {
|
||||||
|
@ -396,7 +396,7 @@ var image = (function () {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var getStyleValue = function (normalizeCss, data) {
|
var getStyleValue = function (normalizeCss, data) {
|
||||||
var image = document.createElement('img');
|
var image = domGlobals.document.createElement('img');
|
||||||
setAttrib(image, 'style', data.style);
|
setAttrib(image, 'style', data.style);
|
||||||
if (getHspace(image) || data.hspace !== '') {
|
if (getHspace(image) || data.hspace !== '') {
|
||||||
setHspace(image, data.hspace);
|
setHspace(image, data.hspace);
|
||||||
|
@ -413,7 +413,7 @@ var image = (function () {
|
||||||
return normalizeCss(image.getAttribute('style'));
|
return normalizeCss(image.getAttribute('style'));
|
||||||
};
|
};
|
||||||
var create = function (normalizeCss, data) {
|
var create = function (normalizeCss, data) {
|
||||||
var image = document.createElement('img');
|
var image = domGlobals.document.createElement('img');
|
||||||
write(normalizeCss, merge(data, { caption: false }), image);
|
write(normalizeCss, merge(data, { caption: false }), image);
|
||||||
setAttrib(image, 'alt', data.alt);
|
setAttrib(image, 'alt', data.alt);
|
||||||
if (data.caption) {
|
if (data.caption) {
|
||||||
|
@ -442,13 +442,13 @@ var image = (function () {
|
||||||
borderStyle: getStyle(image, 'borderStyle')
|
borderStyle: getStyle(image, 'borderStyle')
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var updateProp = function (image, oldData, newData, name$$1, set) {
|
var updateProp = function (image, oldData, newData, name, set) {
|
||||||
if (newData[name$$1] !== oldData[name$$1]) {
|
if (newData[name] !== oldData[name]) {
|
||||||
set(image, name$$1, newData[name$$1]);
|
set(image, name, newData[name]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var normalized = function (set, normalizeCss) {
|
var normalized = function (set, normalizeCss) {
|
||||||
return function (image, name$$1, value) {
|
return function (image, name, value) {
|
||||||
set(image, value);
|
set(image, value);
|
||||||
normalizeStyle(image, normalizeCss);
|
normalizeStyle(image, normalizeCss);
|
||||||
};
|
};
|
||||||
|
@ -952,7 +952,7 @@ var image = (function () {
|
||||||
}
|
}
|
||||||
success(pathJoin(settings.basePath, json.location));
|
success(pathJoin(settings.basePath, json.location));
|
||||||
};
|
};
|
||||||
formData = new FormData();
|
formData = new domGlobals.FormData();
|
||||||
formData.append('file', blobInfo.blob(), blobInfo.filename());
|
formData.append('file', blobInfo.blob(), blobInfo.filename());
|
||||||
xhr.send(formData);
|
xhr.send(formData);
|
||||||
};
|
};
|
||||||
|
@ -1200,5 +1200,5 @@ var image = (function () {
|
||||||
|
|
||||||
return Plugin;
|
return Plugin;
|
||||||
|
|
||||||
}());
|
}(window));
|
||||||
})();
|
})();
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
||||||
(function () {
|
(function () {
|
||||||
var link = (function () {
|
var link = (function (domGlobals) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||||
|
@ -70,21 +70,21 @@ var link = (function () {
|
||||||
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
||||||
|
|
||||||
var appendClickRemove = function (link, evt) {
|
var appendClickRemove = function (link, evt) {
|
||||||
document.body.appendChild(link);
|
domGlobals.document.body.appendChild(link);
|
||||||
link.dispatchEvent(evt);
|
link.dispatchEvent(evt);
|
||||||
document.body.removeChild(link);
|
domGlobals.document.body.removeChild(link);
|
||||||
};
|
};
|
||||||
var open$$1 = function (url) {
|
var open = function (url) {
|
||||||
if (!global$3.ie || global$3.ie > 10) {
|
if (!global$3.ie || global$3.ie > 10) {
|
||||||
var link = document.createElement('a');
|
var link = domGlobals.document.createElement('a');
|
||||||
link.target = '_blank';
|
link.target = '_blank';
|
||||||
link.href = url;
|
link.href = url;
|
||||||
link.rel = 'noreferrer noopener';
|
link.rel = 'noreferrer noopener';
|
||||||
var evt = document.createEvent('MouseEvents');
|
var evt = domGlobals.document.createEvent('MouseEvents');
|
||||||
evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
evt.initMouseEvent('click', true, true, domGlobals.window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||||
appendClickRemove(link, evt);
|
appendClickRemove(link, evt);
|
||||||
} else {
|
} else {
|
||||||
var win = window.open('', '_blank');
|
var win = domGlobals.window.open('', '_blank');
|
||||||
if (win) {
|
if (win) {
|
||||||
win.opener = null;
|
win.opener = null;
|
||||||
var doc = win.document;
|
var doc = win.document;
|
||||||
|
@ -94,7 +94,7 @@ var link = (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var OpenUrl = { open: open$$1 };
|
var OpenUrl = { open: open };
|
||||||
|
|
||||||
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||||
|
|
||||||
|
@ -709,5 +709,5 @@ var link = (function () {
|
||||||
|
|
||||||
return Plugin;
|
return Plugin;
|
||||||
|
|
||||||
}());
|
}(window));
|
||||||
})();
|
})();
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
||||||
(function () {
|
(function () {
|
||||||
var paste = (function () {
|
var paste = (function (domGlobals) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Cell = function (initial) {
|
var Cell = function (initial) {
|
||||||
|
@ -24,8 +24,8 @@ var paste = (function () {
|
||||||
|
|
||||||
var hasProPlugin = function (editor) {
|
var hasProPlugin = function (editor) {
|
||||||
if (/(^|[ ,])powerpaste([, ]|$)/.test(editor.settings.plugins) && global.get('powerpaste')) {
|
if (/(^|[ ,])powerpaste([, ]|$)/.test(editor.settings.plugins) && global.get('powerpaste')) {
|
||||||
if (typeof window.console !== 'undefined' && window.console.log) {
|
if (typeof domGlobals.window.console !== 'undefined' && domGlobals.window.console.log) {
|
||||||
window.console.log('PowerPaste is incompatible with Paste plugin! Remove \'paste\' from the \'plugins\' option.');
|
domGlobals.window.console.log('PowerPaste is incompatible with Paste plugin! Remove \'paste\' from the \'plugins\' option.');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -273,18 +273,18 @@ var paste = (function () {
|
||||||
var ignoreElements = global$3.makeMap('script noscript style textarea video audio iframe object', ' ');
|
var ignoreElements = global$3.makeMap('script noscript style textarea video audio iframe object', ' ');
|
||||||
var blockElements = schema.getBlockElements();
|
var blockElements = schema.getBlockElements();
|
||||||
function walk(node) {
|
function walk(node) {
|
||||||
var name$$1 = node.name, currentNode = node;
|
var name = node.name, currentNode = node;
|
||||||
if (name$$1 === 'br') {
|
if (name === 'br') {
|
||||||
text += '\n';
|
text += '\n';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (name$$1 === 'wbr') {
|
if (name === 'wbr') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (shortEndedElements[name$$1]) {
|
if (shortEndedElements[name]) {
|
||||||
text += ' ';
|
text += ' ';
|
||||||
}
|
}
|
||||||
if (ignoreElements[name$$1]) {
|
if (ignoreElements[name]) {
|
||||||
text += ' ';
|
text += ' ';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -298,9 +298,9 @@ var paste = (function () {
|
||||||
} while (node = node.next);
|
} while (node = node.next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (blockElements[name$$1] && currentNode.next) {
|
if (blockElements[name] && currentNode.next) {
|
||||||
text += '\n';
|
text += '\n';
|
||||||
if (name$$1 === 'p') {
|
if (name === 'p') {
|
||||||
text += '\n';
|
text += '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,7 @@ var paste = (function () {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var isMsEdge = function () {
|
var isMsEdge = function () {
|
||||||
return navigator.userAgent.indexOf(' Edge/') !== -1;
|
return domGlobals.navigator.userAgent.indexOf(' Edge/') !== -1;
|
||||||
};
|
};
|
||||||
var Utils = {
|
var Utils = {
|
||||||
filter: filter,
|
filter: filter,
|
||||||
|
@ -785,13 +785,13 @@ var paste = (function () {
|
||||||
var eq = function (o) {
|
var eq = function (o) {
|
||||||
return o.isNone();
|
return o.isNone();
|
||||||
};
|
};
|
||||||
var call$$1 = function (thunk) {
|
var call = function (thunk) {
|
||||||
return thunk();
|
return thunk();
|
||||||
};
|
};
|
||||||
var id = function (n) {
|
var id = function (n) {
|
||||||
return n;
|
return n;
|
||||||
};
|
};
|
||||||
var noop$$1 = function () {
|
var noop = function () {
|
||||||
};
|
};
|
||||||
var nul = function () {
|
var nul = function () {
|
||||||
return null;
|
return null;
|
||||||
|
@ -807,17 +807,17 @@ var paste = (function () {
|
||||||
isSome: never$1,
|
isSome: never$1,
|
||||||
isNone: always$1,
|
isNone: always$1,
|
||||||
getOr: id,
|
getOr: id,
|
||||||
getOrThunk: call$$1,
|
getOrThunk: call,
|
||||||
getOrDie: function (msg) {
|
getOrDie: function (msg) {
|
||||||
throw new Error(msg || 'error: getOrDie called on none.');
|
throw new Error(msg || 'error: getOrDie called on none.');
|
||||||
},
|
},
|
||||||
getOrNull: nul,
|
getOrNull: nul,
|
||||||
getOrUndefined: undef,
|
getOrUndefined: undef,
|
||||||
or: id,
|
or: id,
|
||||||
orThunk: call$$1,
|
orThunk: call,
|
||||||
map: none,
|
map: none,
|
||||||
ap: none,
|
ap: none,
|
||||||
each: noop$$1,
|
each: noop,
|
||||||
bind: none,
|
bind: none,
|
||||||
flatten: none,
|
flatten: none,
|
||||||
exists: never$1,
|
exists: never$1,
|
||||||
|
@ -955,7 +955,7 @@ var paste = (function () {
|
||||||
var nu = function (baseFn) {
|
var nu = function (baseFn) {
|
||||||
var data = Option.none();
|
var data = Option.none();
|
||||||
var callbacks = [];
|
var callbacks = [];
|
||||||
var map$$1 = function (f) {
|
var map = function (f) {
|
||||||
return nu(function (nCallback) {
|
return nu(function (nCallback) {
|
||||||
get(function (data) {
|
get(function (data) {
|
||||||
nCallback(f(data));
|
nCallback(f(data));
|
||||||
|
@ -981,7 +981,7 @@ var paste = (function () {
|
||||||
};
|
};
|
||||||
var call = function (cb) {
|
var call = function (cb) {
|
||||||
data.each(function (x) {
|
data.each(function (x) {
|
||||||
setTimeout(function () {
|
domGlobals.setTimeout(function () {
|
||||||
cb(x);
|
cb(x);
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
@ -989,18 +989,18 @@ var paste = (function () {
|
||||||
baseFn(set);
|
baseFn(set);
|
||||||
return {
|
return {
|
||||||
get: get,
|
get: get,
|
||||||
map: map$$1,
|
map: map,
|
||||||
isReady: isReady
|
isReady: isReady
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var pure$1 = function (a) {
|
var pure = function (a) {
|
||||||
return nu(function (callback) {
|
return nu(function (callback) {
|
||||||
callback(a);
|
callback(a);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var LazyValue = {
|
var LazyValue = {
|
||||||
nu: nu,
|
nu: nu,
|
||||||
pure: pure$1
|
pure: pure
|
||||||
};
|
};
|
||||||
|
|
||||||
var bounce = function (f) {
|
var bounce = function (f) {
|
||||||
|
@ -1010,7 +1010,7 @@ var paste = (function () {
|
||||||
args[_i] = arguments[_i];
|
args[_i] = arguments[_i];
|
||||||
}
|
}
|
||||||
var me = this;
|
var me = this;
|
||||||
setTimeout(function () {
|
domGlobals.setTimeout(function () {
|
||||||
f.apply(me, args);
|
f.apply(me, args);
|
||||||
}, 0);
|
}, 0);
|
||||||
};
|
};
|
||||||
|
@ -1063,14 +1063,14 @@ var paste = (function () {
|
||||||
get: get
|
get: get
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var pure$2 = function (a) {
|
var pure$1 = function (a) {
|
||||||
return nu$1(function (callback) {
|
return nu$1(function (callback) {
|
||||||
callback(a);
|
callback(a);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var Future = {
|
var Future = {
|
||||||
nu: nu$1,
|
nu: nu$1,
|
||||||
pure: pure$2
|
pure: pure$1
|
||||||
};
|
};
|
||||||
|
|
||||||
var par = function (asyncValues, nu) {
|
var par = function (asyncValues, nu) {
|
||||||
|
@ -1170,8 +1170,8 @@ var paste = (function () {
|
||||||
var pasteImage = function (editor, imageItem) {
|
var pasteImage = function (editor, imageItem) {
|
||||||
var base64 = getBase64FromUri(imageItem.uri);
|
var base64 = getBase64FromUri(imageItem.uri);
|
||||||
var id = uniqueId();
|
var id = uniqueId();
|
||||||
var name$$1 = editor.settings.images_reuse_filename && imageItem.blob.name ? extractFilename(editor, imageItem.blob.name) : id;
|
var name = editor.settings.images_reuse_filename && imageItem.blob.name ? extractFilename(editor, imageItem.blob.name) : id;
|
||||||
var img = new Image();
|
var img = new domGlobals.Image();
|
||||||
img.src = imageItem.uri;
|
img.src = imageItem.uri;
|
||||||
if (isValidDataUriImage(editor.settings, img)) {
|
if (isValidDataUriImage(editor.settings, img)) {
|
||||||
var blobCache = editor.editorUpload.blobCache;
|
var blobCache = editor.editorUpload.blobCache;
|
||||||
|
@ -1180,7 +1180,7 @@ var paste = (function () {
|
||||||
return cachedBlobInfo.base64() === base64;
|
return cachedBlobInfo.base64() === base64;
|
||||||
});
|
});
|
||||||
if (!existingBlobInfo) {
|
if (!existingBlobInfo) {
|
||||||
blobInfo = blobCache.create(id, imageItem.blob, base64, name$$1);
|
blobInfo = blobCache.create(id, imageItem.blob, base64, name);
|
||||||
blobCache.add(blobInfo);
|
blobCache.add(blobInfo);
|
||||||
} else {
|
} else {
|
||||||
blobInfo = existingBlobInfo;
|
blobInfo = existingBlobInfo;
|
||||||
|
@ -1190,8 +1190,8 @@ var paste = (function () {
|
||||||
pasteHtml$1(editor, '<img src="' + imageItem.uri + '">', false);
|
pasteHtml$1(editor, '<img src="' + imageItem.uri + '">', false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var isClipboardEvent = function (event$$1) {
|
var isClipboardEvent = function (event) {
|
||||||
return event$$1.type === 'paste';
|
return event.type === 'paste';
|
||||||
};
|
};
|
||||||
var readBlobsAsDataUris = function (items) {
|
var readBlobsAsDataUris = function (items) {
|
||||||
return mapM(items, function (item) {
|
return mapM(items, function (item) {
|
||||||
|
@ -1239,7 +1239,7 @@ var paste = (function () {
|
||||||
};
|
};
|
||||||
var isBrokenAndroidClipboardEvent = function (e) {
|
var isBrokenAndroidClipboardEvent = function (e) {
|
||||||
var clipboardData = e.clipboardData;
|
var clipboardData = e.clipboardData;
|
||||||
return navigator.userAgent.indexOf('Android') !== -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0;
|
return domGlobals.navigator.userAgent.indexOf('Android') !== -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0;
|
||||||
};
|
};
|
||||||
var isKeyboardPasteEvent = function (e) {
|
var isKeyboardPasteEvent = function (e) {
|
||||||
return global$4.metaKeyPressed(e) && e.keyCode === 86 || e.shiftKey && e.keyCode === 45;
|
return global$4.metaKeyPressed(e) && e.keyCode === 86 || e.shiftKey && e.keyCode === 45;
|
||||||
|
@ -1255,7 +1255,7 @@ var paste = (function () {
|
||||||
}
|
}
|
||||||
if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
|
if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
|
||||||
keyboardPastePlainTextState = e.shiftKey && e.keyCode === 86;
|
keyboardPastePlainTextState = e.shiftKey && e.keyCode === 86;
|
||||||
if (keyboardPastePlainTextState && global$1.webkit && navigator.userAgent.indexOf('Version/') !== -1) {
|
if (keyboardPastePlainTextState && global$1.webkit && domGlobals.navigator.userAgent.indexOf('Version/') !== -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
|
@ -1355,7 +1355,7 @@ var paste = (function () {
|
||||||
var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) {
|
var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) {
|
||||||
registerEventHandlers(editor, pasteBin, pasteFormat);
|
registerEventHandlers(editor, pasteBin, pasteFormat);
|
||||||
var src;
|
var src;
|
||||||
editor.parser.addNodeFilter('img', function (nodes, name$$1, args) {
|
editor.parser.addNodeFilter('img', function (nodes, name, args) {
|
||||||
var isPasteInsert = function (args) {
|
var isPasteInsert = function (args) {
|
||||||
return args.data && args.data.paste === true;
|
return args.data && args.data.paste === true;
|
||||||
};
|
};
|
||||||
|
@ -1388,7 +1388,7 @@ var paste = (function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
var getPasteBinParent = function (editor) {
|
var getPasteBinParent = function (editor) {
|
||||||
return global$1.ie && editor.inline ? document.body : editor.getBody();
|
return global$1.ie && editor.inline ? domGlobals.document.body : editor.getBody();
|
||||||
};
|
};
|
||||||
var isExternalPasteBin = function (editor) {
|
var isExternalPasteBin = function (editor) {
|
||||||
return getPasteBinParent(editor) !== editor.getBody();
|
return getPasteBinParent(editor) !== editor.getBody();
|
||||||
|
@ -1524,7 +1524,7 @@ var paste = (function () {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
var noop$1 = function () {
|
var noop = function () {
|
||||||
};
|
};
|
||||||
var hasWorkingClipboardApi = function (clipboardData) {
|
var hasWorkingClipboardApi = function (clipboardData) {
|
||||||
return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true;
|
return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true;
|
||||||
|
@ -1607,7 +1607,7 @@ var paste = (function () {
|
||||||
var copy = function (editor) {
|
var copy = function (editor) {
|
||||||
return function (evt) {
|
return function (evt) {
|
||||||
if (hasSelectedContent(editor)) {
|
if (hasSelectedContent(editor)) {
|
||||||
setClipboardData(evt, getData(editor), fallback(editor), noop$1);
|
setClipboardData(evt, getData(editor), fallback(editor), noop);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1854,5 +1854,5 @@ var paste = (function () {
|
||||||
|
|
||||||
return Plugin;
|
return Plugin;
|
||||||
|
|
||||||
}());
|
}(window));
|
||||||
})();
|
})();
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
||||||
(function () {
|
(function () {
|
||||||
var tabfocus = (function () {
|
var tabfocus = (function (domGlobals) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||||
|
@ -90,7 +90,7 @@ var tabfocus = (function () {
|
||||||
} else {
|
} else {
|
||||||
global$4.setTimeout(function () {
|
global$4.setTimeout(function () {
|
||||||
if (!global$3.webkit) {
|
if (!global$3.webkit) {
|
||||||
window.focus();
|
domGlobals.window.focus();
|
||||||
}
|
}
|
||||||
el.focus();
|
el.focus();
|
||||||
}, 10);
|
}, 10);
|
||||||
|
@ -120,5 +120,5 @@ var tabfocus = (function () {
|
||||||
|
|
||||||
return Plugin;
|
return Plugin;
|
||||||
|
|
||||||
}());
|
}(window));
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.EditorManager"),s=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),d=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},m=t.DOM,n=function(e){e.keyCode!==f.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==f.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=y.explode(d(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):m.get(e[0]):":next"===e[1]?u(1):m.get(e[1]))){var t=c.get(o.id||o.name);o.id&&t?t.focus():a.setTimeout(function(){s.webkit||window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&c.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=m.select(":input:enabled,*[tabindex]:not(iframe)"),y.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&m.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),s.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}();
|
!function(c){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.VK"),m=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},v=t.DOM,n=function(e){e.keyCode!==d.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==d.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=f.explode(m(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):v.get(e[0]):":next"===e[1]?u(1):v.get(e[1]))){var t=s.get(o.id||o.name);o.id&&t?t.focus():y.setTimeout(function(){a.webkit||c.window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&s.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),f.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&v.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),a.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}(window);
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.2.1-alpha-45341';
|
$wp_version = '5.2.1-alpha-45343';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
@ -27,7 +27,7 @@ $wp_db_version = 44719;
|
||||||
*
|
*
|
||||||
* @global string $tinymce_version
|
* @global string $tinymce_version
|
||||||
*/
|
*/
|
||||||
$tinymce_version = '4920-20181217';
|
$tinymce_version = '4940-20190515';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the required PHP version
|
* Holds the required PHP version
|
||||||
|
|
Loading…
Reference in New Issue