mirror of
git://develop.git.wordpress.org/
synced 2025-01-29 18:48:18 +01:00
TinyMCE: update to 4.6.2. Changelog: https://www.tinymce.com/docs/changelog/#version462-may232017.
Fixes #40859 #40756. git-svn-id: https://develop.svn.wordpress.org/trunk@40834 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6d02212d57
commit
f26acaeb99
@ -517,7 +517,7 @@ define(
|
||||
|
||||
var getData = function (editor) {
|
||||
return {
|
||||
html: editor.selection.getContent(),
|
||||
html: editor.selection.getContent({ contextual: true }),
|
||||
text: editor.selection.getContent({ format: 'text' })
|
||||
};
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -283,17 +283,17 @@ define(
|
||||
function (DOMUtils) {
|
||||
var DOM = DOMUtils.DOM;
|
||||
|
||||
var reposition = function (editor, poweredByElm) {
|
||||
var reposition = function (editor, poweredByElm, hasStatusbar) {
|
||||
return function () {
|
||||
var iframeWidth = editor.getContentAreaContainer().querySelector('iframe').offsetWidth;
|
||||
var scrollbarWidth = Math.max(iframeWidth - editor.getDoc().documentElement.offsetWidth, 0);
|
||||
var statusbarElm = editor.getContainer().querySelector('.mce-statusbar');
|
||||
var statusbarHeight = statusbarElm ? statusbarElm.offsetHeight : 1;
|
||||
|
||||
DOM.setStyles(poweredByElm, {
|
||||
right: scrollbarWidth + 'px',
|
||||
bottom: statusbarHeight + 'px'
|
||||
});
|
||||
DOM.setStyle(poweredByElm, 'right', scrollbarWidth + 'px');
|
||||
if (hasStatusbar) {
|
||||
DOM.setStyle(poweredByElm, 'top', '-16px');
|
||||
} else {
|
||||
DOM.setStyle(poweredByElm, 'bottom', '1px');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@ -303,13 +303,33 @@ define(
|
||||
};
|
||||
};
|
||||
|
||||
var setupReposition = function (editor, poweredByElm, hasStatusbar) {
|
||||
reposition(editor, poweredByElm, hasStatusbar)();
|
||||
editor.on('NodeChange ResizeEditor', reposition(editor, poweredByElm, hasStatusbar));
|
||||
};
|
||||
|
||||
var appendToStatusbar = function (editor, poweredByElm, statusbarElm) {
|
||||
statusbarElm.appendChild(poweredByElm);
|
||||
setupReposition(editor, poweredByElm, true);
|
||||
};
|
||||
|
||||
var appendToContainer = function (editor, poweredByElm) {
|
||||
editor.getContainer().appendChild(poweredByElm);
|
||||
setupReposition(editor, poweredByElm, false);
|
||||
};
|
||||
|
||||
var setupEventListeners = function (editor) {
|
||||
editor.on('SkinLoaded', function () {
|
||||
var poweredByElm = DOM.create('div', { 'class': 'mce-branding-powered-by' });
|
||||
editor.getContainer().appendChild(poweredByElm);
|
||||
var statusbarElm = editor.getContainer().querySelector('.mce-statusbar');
|
||||
|
||||
if (statusbarElm) {
|
||||
appendToStatusbar(editor, poweredByElm, statusbarElm);
|
||||
} else {
|
||||
appendToContainer(editor, poweredByElm);
|
||||
}
|
||||
|
||||
DOM.bind(poweredByElm, 'click', hide(poweredByElm));
|
||||
reposition(editor, poweredByElm)();
|
||||
editor.on('NodeChange ResizeEditor', reposition(editor, poweredByElm));
|
||||
});
|
||||
};
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
28
src/wp-includes/js/tinymce/tinymce.min.js
vendored
28
src/wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
@ -18,7 +18,7 @@ $wp_db_version = 38590;
|
||||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '4601-20170510';
|
||||
$tinymce_version = '4602-20170524';
|
||||
|
||||
/**
|
||||
* Holds the required PHP version
|
||||
|
Loading…
x
Reference in New Issue
Block a user