TinyMCE: update to 4.1.10.

Fixes #32262.

git-svn-id: https://develop.svn.wordpress.org/trunk@32366 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-05-06 03:22:04 +00:00
parent 2ce97b2984
commit 8737968ac2
4 changed files with 70 additions and 47 deletions

View File

@ -78,7 +78,7 @@ var tinyMCEPopup = {
* tinyMCEPopup.onInit.add(function(ed) {
* alert(ed.selection.getContent());
* });
*
*
* // Executes the init method on page load in some object using the SomeObject scope
* tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
*/
@ -327,7 +327,7 @@ var tinyMCEPopup = {
}
},
// Internal functions
// Internal functions
_restoreSelection : function() {
var e = window.event.srcElement;
@ -359,7 +359,7 @@ var tinyMCEPopup = {
"browse": "Browse"
};
var langCode = tinymce.settings.language || 'en';
var langCode = (tinymce.settings ? tinymce.settings : t.editor.settings).language || 'en';
for (var key in map) {
tinymce.i18n.data[langCode + "." + key] = tinymce.i18n.translate(map[key]);
}
@ -523,7 +523,7 @@ tinymce.util.Dispatcher = function(scope) {
var self = this, returnValue, args = arguments, i, listeners = self.listeners, listener;
self.inDispatch = true;
// Needs to be a real loop since the listener count might change while looping
// And this is also more efficient
for (i = 0; i < listeners.length; i++) {

View File

@ -1,4 +1,4 @@
// 4.1.9 (2015-04-05)
// 4.1.10 (2015-05-05)
/**
* Compiled inline version. (Library mode)
@ -6209,7 +6209,7 @@ define("tinymce/html/Entities", [
attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
rawCharsRegExp = /[<>&\"\']/g,
entityRegExp = /&(#x|#)?([\w]+);/g,
entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi,
asciiMap = {
128: "\u20AC", 130: "\u201A", 131: "\u0192", 132: "\u201E", 133: "\u2026", 134: "\u2020",
135: "\u2021", 136: "\u02C6", 137: "\u2030", 138: "\u0160", 139: "\u2039", 140: "\u0152",
@ -6423,17 +6423,21 @@ define("tinymce/html/Entities", [
* @return {String} Entity decoded string.
*/
decode: function(text) {
return text.replace(entityRegExp, function(all, numeric, value) {
return text.replace(entityRegExp, function(all, numeric) {
if (numeric) {
value = parseInt(value, numeric.length === 2 ? 16 : 10);
if (numeric.charAt(0).toLowerCase() === 'x') {
numeric = parseInt(numeric.substr(1), 16);
} else {
numeric = parseInt(numeric, 10);
}
// Support upper UTF
if (value > 0xFFFF) {
value -= 0x10000;
if (numeric > 0xFFFF) {
numeric -= 0x10000;
return String.fromCharCode(0xD800 + (value >> 10), 0xDC00 + (value & 0x3FF));
return String.fromCharCode(0xD800 + (numeric >> 10), 0xDC00 + (numeric & 0x3FF));
} else {
return asciiMap[value] || String.fromCharCode(value);
return asciiMap[numeric] || String.fromCharCode(numeric);
}
}
@ -12648,7 +12652,7 @@ define("tinymce/html/Writer", [
*/
pi: function(name, text) {
if (text) {
html.push('<?', name, ' ', text, '?>');
html.push('<?', name, ' ', encode(text), '?>');
} else {
html.push('<?', name, '?>');
}
@ -15585,7 +15589,8 @@ define("tinymce/dom/Selection", [
},
/**
* Executes callback of the current selection matches the specified selector or not and passes the state and args to the callback.
* Executes callback when the current selection starts/stops matching the specified selector. The current
* state will be passed to the callback as it's first argument.
*
* @method selectorChanged
* @param {String} selector CSS selector to check for.
@ -16130,6 +16135,10 @@ define("tinymce/Formatter", [
return !!ed.schema.getTextBlockElements()[name.toLowerCase()];
}
function isTableCell(node) {
return /^(TH|TD)$/.test(node.nodeName);
}
function getParents(node, selector) {
return dom.getParents(node, selector, dom.getRoot());
}
@ -16862,21 +16871,28 @@ define("tinymce/Formatter", [
// Try to adjust endContainer as well if cells on the same row were selected - bug #6410
if (commonAncestorContainer &&
/^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) &&
/^(TH|TD)$/.test(endContainer.nodeName) && endContainer.firstChild) {
isTableCell(endContainer) && endContainer.firstChild) {
endContainer = endContainer.firstChild || endContainer;
}
// Wrap start/end nodes in span element since these might be cloned/moved
startContainer = wrap(startContainer, 'span', {id: '_start', 'data-mce-type': 'bookmark'});
endContainer = wrap(endContainer, 'span', {id: '_end', 'data-mce-type': 'bookmark'});
if (dom.isChildOf(startContainer, endContainer) && !isTableCell(startContainer) && !isTableCell(endContainer)) {
startContainer = wrap(startContainer, 'span', {id: '_start', 'data-mce-type': 'bookmark'});
splitToFormatRoot(startContainer);
startContainer = unwrap(TRUE);
return;
} else {
// Wrap start/end nodes in span element since these might be cloned/moved
startContainer = wrap(startContainer, 'span', {id: '_start', 'data-mce-type': 'bookmark'});
endContainer = wrap(endContainer, 'span', {id: '_end', 'data-mce-type': 'bookmark'});
// Split start/end
splitToFormatRoot(startContainer);
splitToFormatRoot(endContainer);
// Split start/end
splitToFormatRoot(startContainer);
splitToFormatRoot(endContainer);
// Unwrap start/end to get real elements again
startContainer = unwrap(TRUE);
endContainer = unwrap();
// Unwrap start/end to get real elements again
startContainer = unwrap(TRUE);
endContainer = unwrap();
}
} else {
startContainer = endContainer = splitToFormatRoot(startContainer);
}
@ -18448,6 +18464,10 @@ define("tinymce/UndoManager", [
return trim(content);
}
function setDirty(state) {
editor.isNotDirty = !state;
}
function addNonTypingUndoLevel(e) {
self.typing = false;
self.add({}, e);
@ -18497,9 +18517,9 @@ define("tinymce/UndoManager", [
// Fire a TypingUndo event on the first character entered
if (isFirstTypedCharacter && self.typing) {
// Make the it dirty if the content was changed after typing the first character
// Make it dirty if the content was changed after typing the first character
if (!editor.isDirty()) {
editor.isNotDirty = !data[0] || getContent() == data[0].content;
setDirty(data[0] && getContent() != data[0].content);
// Fire initial change event
if (!editor.isNotDirty) {
@ -18525,8 +18545,8 @@ define("tinymce/UndoManager", [
return;
}
// If key isn't shift,ctrl,alt,capslock,metakey
var modKey = VK.modifierPressed(e);
// If key isn't Ctrl+Alt/AltGr
var modKey = (e.ctrlKey && !e.altKey) || e.metaKey;
if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !self.typing && !modKey) {
self.beforeChange();
self.typing = true;
@ -18551,6 +18571,7 @@ define("tinymce/UndoManager", [
}
});
/*eslint consistent-this:0 */
self = {
// Explose for debugging reasons
data: data,
@ -18636,7 +18657,7 @@ define("tinymce/UndoManager", [
editor.fire('AddUndo', args);
if (index > 0) {
editor.isNotDirty = false;
setDirty(true);
editor.fire('change', args);
}
@ -18662,7 +18683,7 @@ define("tinymce/UndoManager", [
// Undo to first index then set dirty state to false
if (index === 0) {
editor.isNotDirty = true;
setDirty(false);
}
editor.setContent(level.content, {format: 'raw'});
@ -18688,6 +18709,7 @@ define("tinymce/UndoManager", [
editor.setContent(level.content, {format: 'raw'});
editor.selection.moveToBookmark(level.bookmark);
setDirty(true);
editor.fire('redo', {level: level});
}
@ -28020,7 +28042,7 @@ define("tinymce/util/Quirks", [
editor.on('keydown', function(e) {
if (VK.metaKeyPressed(e) && (e.keyCode == 37 || e.keyCode == 39)) {
e.preventDefault();
editor.selection.getSel().modify('move', e.keyCode == 37 ? 'backward' : 'forward', 'word');
editor.selection.getSel().modify('move', e.keyCode == 37 ? 'backward' : 'forward', 'lineboundary');
}
});
}
@ -29780,7 +29802,9 @@ define("tinymce/Editor", [
editor = self.editorManager.get(settings.auto_focus);
}
editor.focus();
if (!editor.destroyed) {
editor.focus();
}
}, 100);
}
@ -31314,7 +31338,7 @@ define("tinymce/EditorManager", [
* @property minorVersion
* @type String
*/
minorVersion: '1.9',
minorVersion: '1.10',
/**
* Release date of TinyMCE build.
@ -31322,7 +31346,7 @@ define("tinymce/EditorManager", [
* @property releaseDate
* @type String
*/
releaseDate: '2015-04-05',
releaseDate: '2015-05-05',
/**
* Collection of editor instances.

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ $wp_db_version = 32364;
*
* @global string $tinymce_version
*/
$tinymce_version = '4109-20150406';
$tinymce_version = '4110-20150505';
/**
* Holds the required PHP version