TinyMCE: update to 4.2.2. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #33033, #33042. See #33083. git-svn-id: https://develop.svn.wordpress.org/trunk@33369 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bc7ad4b965
commit
eee2fa493b
@ -12,7 +12,7 @@
|
||||
|
||||
tinymce.ThemeManager.add('modern', function(editor) {
|
||||
var self = this, settings = editor.settings, Factory = tinymce.ui.Factory,
|
||||
each = tinymce.each, DOM = tinymce.DOM, Rect = tinymce.ui.Rect;
|
||||
each = tinymce.each, DOM = tinymce.DOM, Rect = tinymce.ui.Rect, FloatPanel = tinymce.ui.FloatPanel;
|
||||
|
||||
// Default menus
|
||||
var defaultMenus = {
|
||||
@ -480,7 +480,9 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
|
||||
function repositionHandler() {
|
||||
function execute() {
|
||||
reposition(findFrontMostMatch(editor.selection.getNode()));
|
||||
if (editor.selection) {
|
||||
reposition(findFrontMostMatch(editor.selection.getNode()));
|
||||
}
|
||||
}
|
||||
|
||||
if (window.requestAnimationFrame) {
|
||||
@ -639,10 +641,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
panel.hide();
|
||||
|
||||
// All other autohidden float panels will be closed below.
|
||||
// Need to check for hideAll since it might be a normal panel
|
||||
if (panel.hideAll) {
|
||||
panel.hideAll();
|
||||
}
|
||||
FloatPanel.hideAll();
|
||||
|
||||
DOM.removeClass(editor.getBody(), 'mce-edit-focus');
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
// 4.2.1 (2015-06-29)
|
||||
// 4.2.2 (2015-07-22)
|
||||
|
||||
/**
|
||||
* Compiled inline version. (Library mode)
|
||||
@ -12068,30 +12068,31 @@ define("tinymce/html/DomParser", [
|
||||
for (textNode = node.prev; textNode && textNode.type === 3;) {
|
||||
textVal = textNode.value.replace(endWhiteSpaceRegExp, '');
|
||||
|
||||
// Found a text node with non whitespace then trim that and break
|
||||
if (textVal.length > 0) {
|
||||
textNode.value = textVal;
|
||||
textNode = textNode.prev;
|
||||
} else {
|
||||
textNodeNext = textNode.next;
|
||||
return;
|
||||
}
|
||||
|
||||
// Fix for bug #7543 where bogus nodes would produce empty
|
||||
// text nodes and these would be removed if a nested list was before it
|
||||
if (textNodeNext) {
|
||||
if (textNodeNext.type == 3 && textNodeNext.value.length) {
|
||||
textNode = textNode.prev;
|
||||
continue;
|
||||
}
|
||||
textNodeNext = textNode.next;
|
||||
|
||||
if (!blockElements[textNodeNext.name] && textNodeNext.name != 'script' && textNodeNext.name != 'style') {
|
||||
textNode = textNode.prev;
|
||||
continue;
|
||||
}
|
||||
// Fix for bug #7543 where bogus nodes would produce empty
|
||||
// text nodes and these would be removed if a nested list was before it
|
||||
if (textNodeNext) {
|
||||
if (textNodeNext.type == 3 && textNodeNext.value.length) {
|
||||
textNode = textNode.prev;
|
||||
continue;
|
||||
}
|
||||
|
||||
sibling = textNode.prev;
|
||||
textNode.remove();
|
||||
textNode = sibling;
|
||||
if (!blockElements[textNodeNext.name] && textNodeNext.name != 'script' && textNodeNext.name != 'style') {
|
||||
textNode = textNode.prev;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
sibling = textNode.prev;
|
||||
textNode.remove();
|
||||
textNode = sibling;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27020,7 +27021,7 @@ define("tinymce/ui/Window", [
|
||||
/**
|
||||
* This class is used to create MessageBoxes like alerts/confirms etc.
|
||||
*
|
||||
* @class tinymce.ui.Window
|
||||
* @class tinymce.ui.MessageBox
|
||||
* @extends tinymce.ui.FloatPanel
|
||||
*/
|
||||
define("tinymce/ui/MessageBox", [
|
||||
@ -32847,7 +32848,7 @@ define("tinymce/EditorManager", [
|
||||
* @property minorVersion
|
||||
* @type String
|
||||
*/
|
||||
minorVersion: '2.1',
|
||||
minorVersion: '2.2',
|
||||
|
||||
/**
|
||||
* Release date of TinyMCE build.
|
||||
@ -32855,7 +32856,7 @@ define("tinymce/EditorManager", [
|
||||
* @property releaseDate
|
||||
* @type String
|
||||
*/
|
||||
releaseDate: '2015-06-29',
|
||||
releaseDate: '2015-07-22',
|
||||
|
||||
/**
|
||||
* Collection of editor instances.
|
||||
@ -35276,11 +35277,27 @@ define("tinymce/ui/ComboBox", [
|
||||
);
|
||||
},
|
||||
|
||||
value: function(value) {
|
||||
if (arguments.length) {
|
||||
this.state.set('value', value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// Make sure the real state is in sync
|
||||
if (this.state.get('rendered')) {
|
||||
this.state.set('value', this.getEl('inp').value);
|
||||
}
|
||||
|
||||
return this.state.get('value');
|
||||
},
|
||||
|
||||
bindStates: function() {
|
||||
var self = this;
|
||||
|
||||
self.state.on('change:value', function(e) {
|
||||
self.getEl('inp').value = e.value;
|
||||
if (self.getEl('inp').value != e.value) {
|
||||
self.getEl('inp').value = e.value;
|
||||
}
|
||||
});
|
||||
|
||||
self.state.on('change:disabled', function(e) {
|
||||
@ -36236,7 +36253,7 @@ define("tinymce/ui/ElementPath", [
|
||||
if (editor.settings.elementpath !== false) {
|
||||
self.on('select', function(e) {
|
||||
editor.focus();
|
||||
editor.selection.select(this.data()[e.index].element);
|
||||
editor.selection.select(this.row()[e.index].element);
|
||||
editor.nodeChanged();
|
||||
});
|
||||
|
||||
@ -38774,7 +38791,7 @@ define("tinymce/ui/Menu", [
|
||||
self.items().each(function(ctrl) {
|
||||
var settings = ctrl.settings;
|
||||
|
||||
if (settings.icon || settings.selectable) {
|
||||
if (settings.icon || settings.image || settings.selectable) {
|
||||
self._hasIcons = true;
|
||||
return false;
|
||||
}
|
||||
@ -40015,7 +40032,9 @@ define("tinymce/ui/TextBox", [
|
||||
var self = this;
|
||||
|
||||
self.state.on('change:value', function(e) {
|
||||
self.getEl().value = e.value;
|
||||
if (self.getEl().value != e.value) {
|
||||
self.getEl().value = e.value;
|
||||
}
|
||||
});
|
||||
|
||||
self.state.on('change:disabled', function(e) {
|
||||
|
14
src/wp-includes/js/tinymce/tinymce.min.js
vendored
14
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 = 33055;
|
||||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '4201-20150630';
|
||||
$tinymce_version = '4202-20150722';
|
||||
|
||||
/**
|
||||
* Holds the required PHP version
|
||||
|
@ -528,4 +528,15 @@
|
||||
'<div>a b<p>c</p></div>'
|
||||
);
|
||||
});
|
||||
|
||||
test('Bug #7582 removes whitespace between bogus elements before a block', function() {
|
||||
var serializer = new tinymce.html.Serializer();
|
||||
|
||||
equal(
|
||||
serializer.serialize(new tinymce.html.DomParser().parse(
|
||||
'<div>1 <span data-mce-bogus="1">2</span><div>3</div></div>')
|
||||
),
|
||||
'<div>1 2<div>3</div></div>'
|
||||
);
|
||||
});
|
||||
})();
|
||||
|
@ -162,13 +162,13 @@ test('getBoolAttrs', function() {
|
||||
expect(1);
|
||||
|
||||
schema = new tinymce.html.Schema();
|
||||
deepEqual(schema.getBoolAttrs(), { // WP: include three additional bool attributes used in the "media" plugin.
|
||||
deepEqual(schema.getBoolAttrs(), {
|
||||
"CONTROLS": {}, "LOOP": {}, "AUTOPLAY": {}, "SELECTED": {}, "READONLY": {}, "NOWRAP": {},
|
||||
"NOSHADE": {}, "NORESIZE": {}, "NOHREF": {}, "MULTIPLE": {}, "ISMAP": {}, "DISABLED": {}, "DEFER": {},
|
||||
"DECLARE": {}, "COMPACT": {}, "CHECKED": {},
|
||||
"allowfullscreen": {}, "controls": {}, "loop": {}, "autoplay": {}, "selected": {}, "readonly": {}, "mozallowfullscreen": {},
|
||||
"nowrap": {}, "noshade": {}, "noresize": {}, "nohref": {}, "multiple": {}, "ismap": {}, "disabled": {}, "defer": {},
|
||||
"declare": {}, "compact": {}, "checked": {}, "webkitallowfullscreen": {}
|
||||
"controls": {}, "loop": {}, "autoplay": {}, "selected": {}, "readonly": {}, "nowrap": {},
|
||||
"noshade": {}, "noresize": {}, "nohref": {}, "multiple": {}, "ismap": {}, "disabled": {}, "defer": {},
|
||||
"declare": {}, "compact": {}, "checked": {}
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user