Skip to content
Permalink
Browse files

Update TinyMCE to 4.9.4. Changelog: https://github.com/tinymce/tinymc…

…e/blob/4.x/changelog.txt.

Props parkcityj, azaozz.
Merges [45316] to the 5.2 branch.
Fixes #47229 #47205.

git-svn-id: https://develop.svn.wordpress.org/branches/5.2@45343 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
azaozz committed May 17, 2019
1 parent 7a5aab3 commit f2da510bbdb77ac59c53b58b4c063093f3009ed1
@@ -1,5 +1,5 @@
(function () {
var fullscreen = (function () {
var fullscreen = (function (domGlobals) {
'use strict';

var Cell = function (initial) {
@@ -42,8 +42,8 @@ var fullscreen = (function () {
var getWindowSize = function () {
var w;
var h;
var win = window;
var doc = document;
var win = domGlobals.window;
var doc = domGlobals.document;
var body = doc.body;
if (body.offsetWidth) {
w = body.offsetWidth;
@@ -66,19 +66,19 @@ var fullscreen = (function () {
};
};
var setScrollPos = function (pos) {
window.scrollTo(pos.x, pos.y);
domGlobals.window.scrollTo(pos.x, pos.y);
};
var toggleFullscreen = function (editor, fullscreenState) {
var body = document.body;
var documentElement = document.documentElement;
var body = domGlobals.document.body;
var documentElement = domGlobals.document.documentElement;
var editorContainerStyle;
var editorContainer, iframe, iframeStyle;
var fullscreenInfo = fullscreenState.get();
var resize = function () {
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
};
var removeResize = function () {
DOM.unbind(window, 'resize', resize);
DOM.unbind(domGlobals.window, 'resize', resize);
};
editorContainer = editor.getContainer();
editorContainerStyle = editorContainer.style;
@@ -99,7 +99,7 @@ var fullscreen = (function () {
DOM.addClass(body, 'mce-fullscreen');
DOM.addClass(documentElement, 'mce-fullscreen');
DOM.addClass(editorContainer, 'mce-fullscreen');
DOM.bind(window, 'resize', resize);
DOM.bind(domGlobals.window, 'resize', resize);
editor.on('remove', removeResize);
resize();
fullscreenState.set(newFullScreenInfo);
@@ -117,7 +117,7 @@ var fullscreen = (function () {
DOM.removeClass(documentElement, 'mce-fullscreen');
DOM.removeClass(editorContainer, 'mce-fullscreen');
setScrollPos(fullscreenInfo.scrollPos);
DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler);
DOM.unbind(domGlobals.window, 'resize', fullscreenInfo.resizeHandler);
editor.off('remove', fullscreenInfo.removeHandler);
fullscreenState.set(null);
Events.fireFullscreenStateChanged(editor, false);
@@ -173,5 +173,5 @@ var fullscreen = (function () {

return Plugin;

}());
}(window));
})();

Some generated files are not rendered by default. Learn more.

@@ -1,5 +1,5 @@
(function () {
var image = (function () {
var image = (function (domGlobals) {
'use strict';

var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
@@ -63,7 +63,7 @@ var image = (function () {
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 o = scope !== undefined && scope !== null ? scope : Global;
@@ -102,7 +102,7 @@ var image = (function () {
return Math.max(parseInt(val1, 10), parseInt(val2, 10));
};
var getImageSize = function (url, callback) {
var img = document.createElement('img');
var img = domGlobals.document.createElement('img');
function done(width, height) {
if (img.parentNode) {
img.parentNode.removeChild(img);
@@ -125,7 +125,7 @@ var image = (function () {
style.position = 'fixed';
style.bottom = style.left = '0px';
style.width = style.height = 'auto';
document.body.appendChild(img);
domGlobals.document.body.appendChild(img);
img.src = url;
};
var buildListItems = function (inputList, itemCallback, startItems) {
@@ -294,21 +294,21 @@ var image = (function () {
return '';
}
};
var getAttrib = function (image, name$$1) {
if (image.hasAttribute(name$$1)) {
return image.getAttribute(name$$1);
var getAttrib = function (image, name) {
if (image.hasAttribute(name)) {
return image.getAttribute(name);
} else {
return '';
}
};
var getStyle = function (image, name$$1) {
return image.style[name$$1] ? image.style[name$$1] : '';
var getStyle = function (image, name) {
return image.style[name] ? image.style[name] : '';
};
var hasCaption = function (image) {
return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
};
var setAttrib = function (image, name$$1, value) {
image.setAttribute(name$$1, value);
var setAttrib = function (image, name, value) {
image.setAttribute(name, value);
};
var wrapInFigure = function (image) {
var figureElm = DOM.create('figure', { class: 'image' });
@@ -339,21 +339,21 @@ var image = (function () {
image.removeAttribute('style');
}
};
var setSize = function (name$$1, normalizeCss) {
return function (image, name$$1, value) {
if (image.style[name$$1]) {
image.style[name$$1] = Utils.addPixelSuffix(value);
var setSize = function (name, normalizeCss) {
return function (image, name, value) {
if (image.style[name]) {
image.style[name] = Utils.addPixelSuffix(value);
normalizeStyle(image, normalizeCss);
} else {
setAttrib(image, name$$1, value);
setAttrib(image, name, value);
}
};
};
var getSize = function (image, name$$1) {
if (image.style[name$$1]) {
return Utils.removePixelSuffix(image.style[name$$1]);
var getSize = function (image, name) {
if (image.style[name]) {
return Utils.removePixelSuffix(image.style[name]);
} else {
return getAttrib(image, name$$1);
return getAttrib(image, name);
}
};
var setHspace = function (image, value) {
@@ -396,7 +396,7 @@ var image = (function () {
};
};
var getStyleValue = function (normalizeCss, data) {
var image = document.createElement('img');
var image = domGlobals.document.createElement('img');
setAttrib(image, 'style', data.style);
if (getHspace(image) || data.hspace !== '') {
setHspace(image, data.hspace);
@@ -413,7 +413,7 @@ var image = (function () {
return normalizeCss(image.getAttribute('style'));
};
var create = function (normalizeCss, data) {
var image = document.createElement('img');
var image = domGlobals.document.createElement('img');
write(normalizeCss, merge(data, { caption: false }), image);
setAttrib(image, 'alt', data.alt);
if (data.caption) {
@@ -442,13 +442,13 @@ var image = (function () {
borderStyle: getStyle(image, 'borderStyle')
};
};
var updateProp = function (image, oldData, newData, name$$1, set) {
if (newData[name$$1] !== oldData[name$$1]) {
set(image, name$$1, newData[name$$1]);
var updateProp = function (image, oldData, newData, name, set) {
if (newData[name] !== oldData[name]) {
set(image, name, newData[name]);
}
};
var normalized = function (set, normalizeCss) {
return function (image, name$$1, value) {
return function (image, name, value) {
set(image, value);
normalizeStyle(image, normalizeCss);
};
@@ -952,7 +952,7 @@ var image = (function () {
}
success(pathJoin(settings.basePath, json.location));
};
formData = new FormData();
formData = new domGlobals.FormData();
formData.append('file', blobInfo.blob(), blobInfo.filename());
xhr.send(formData);
};
@@ -1200,5 +1200,5 @@ var image = (function () {

return Plugin;

}());
}(window));
})();

0 comments on commit f2da510

Please sign in to comment.
You can’t perform that action at this time.