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:
parent
2ce97b2984
commit
8737968ac2
8
src/wp-includes/js/tinymce/tiny_mce_popup.js
vendored
8
src/wp-includes/js/tinymce/tiny_mce_popup.js
vendored
@ -78,7 +78,7 @@ var tinyMCEPopup = {
|
|||||||
* tinyMCEPopup.onInit.add(function(ed) {
|
* tinyMCEPopup.onInit.add(function(ed) {
|
||||||
* alert(ed.selection.getContent());
|
* alert(ed.selection.getContent());
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* // Executes the init method on page load in some object using the SomeObject scope
|
* // Executes the init method on page load in some object using the SomeObject scope
|
||||||
* tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
|
* tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
|
||||||
*/
|
*/
|
||||||
@ -327,7 +327,7 @@ var tinyMCEPopup = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Internal functions
|
// Internal functions
|
||||||
|
|
||||||
_restoreSelection : function() {
|
_restoreSelection : function() {
|
||||||
var e = window.event.srcElement;
|
var e = window.event.srcElement;
|
||||||
@ -359,7 +359,7 @@ var tinyMCEPopup = {
|
|||||||
"browse": "Browse"
|
"browse": "Browse"
|
||||||
};
|
};
|
||||||
|
|
||||||
var langCode = tinymce.settings.language || 'en';
|
var langCode = (tinymce.settings ? tinymce.settings : t.editor.settings).language || 'en';
|
||||||
for (var key in map) {
|
for (var key in map) {
|
||||||
tinymce.i18n.data[langCode + "." + key] = tinymce.i18n.translate(map[key]);
|
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;
|
var self = this, returnValue, args = arguments, i, listeners = self.listeners, listener;
|
||||||
|
|
||||||
self.inDispatch = true;
|
self.inDispatch = true;
|
||||||
|
|
||||||
// Needs to be a real loop since the listener count might change while looping
|
// Needs to be a real loop since the listener count might change while looping
|
||||||
// And this is also more efficient
|
// And this is also more efficient
|
||||||
for (i = 0; i < listeners.length; i++) {
|
for (i = 0; i < listeners.length; i++) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// 4.1.9 (2015-04-05)
|
// 4.1.10 (2015-05-05)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compiled inline version. (Library mode)
|
* Compiled inline version. (Library mode)
|
||||||
@ -6209,7 +6209,7 @@ define("tinymce/html/Entities", [
|
|||||||
attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
||||||
textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
||||||
rawCharsRegExp = /[<>&\"\']/g,
|
rawCharsRegExp = /[<>&\"\']/g,
|
||||||
entityRegExp = /&(#x|#)?([\w]+);/g,
|
entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi,
|
||||||
asciiMap = {
|
asciiMap = {
|
||||||
128: "\u20AC", 130: "\u201A", 131: "\u0192", 132: "\u201E", 133: "\u2026", 134: "\u2020",
|
128: "\u20AC", 130: "\u201A", 131: "\u0192", 132: "\u201E", 133: "\u2026", 134: "\u2020",
|
||||||
135: "\u2021", 136: "\u02C6", 137: "\u2030", 138: "\u0160", 139: "\u2039", 140: "\u0152",
|
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.
|
* @return {String} Entity decoded string.
|
||||||
*/
|
*/
|
||||||
decode: function(text) {
|
decode: function(text) {
|
||||||
return text.replace(entityRegExp, function(all, numeric, value) {
|
return text.replace(entityRegExp, function(all, numeric) {
|
||||||
if (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
|
// Support upper UTF
|
||||||
if (value > 0xFFFF) {
|
if (numeric > 0xFFFF) {
|
||||||
value -= 0x10000;
|
numeric -= 0x10000;
|
||||||
|
|
||||||
return String.fromCharCode(0xD800 + (value >> 10), 0xDC00 + (value & 0x3FF));
|
return String.fromCharCode(0xD800 + (numeric >> 10), 0xDC00 + (numeric & 0x3FF));
|
||||||
} else {
|
} 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) {
|
pi: function(name, text) {
|
||||||
if (text) {
|
if (text) {
|
||||||
html.push('<?', name, ' ', text, '?>');
|
html.push('<?', name, ' ', encode(text), '?>');
|
||||||
} else {
|
} else {
|
||||||
html.push('<?', name, '?>');
|
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
|
* @method selectorChanged
|
||||||
* @param {String} selector CSS selector to check for.
|
* @param {String} selector CSS selector to check for.
|
||||||
@ -16130,6 +16135,10 @@ define("tinymce/Formatter", [
|
|||||||
return !!ed.schema.getTextBlockElements()[name.toLowerCase()];
|
return !!ed.schema.getTextBlockElements()[name.toLowerCase()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isTableCell(node) {
|
||||||
|
return /^(TH|TD)$/.test(node.nodeName);
|
||||||
|
}
|
||||||
|
|
||||||
function getParents(node, selector) {
|
function getParents(node, selector) {
|
||||||
return dom.getParents(node, selector, dom.getRoot());
|
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
|
// Try to adjust endContainer as well if cells on the same row were selected - bug #6410
|
||||||
if (commonAncestorContainer &&
|
if (commonAncestorContainer &&
|
||||||
/^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) &&
|
/^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) &&
|
||||||
/^(TH|TD)$/.test(endContainer.nodeName) && endContainer.firstChild) {
|
isTableCell(endContainer) && endContainer.firstChild) {
|
||||||
endContainer = endContainer.firstChild || endContainer;
|
endContainer = endContainer.firstChild || endContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrap start/end nodes in span element since these might be cloned/moved
|
if (dom.isChildOf(startContainer, endContainer) && !isTableCell(startContainer) && !isTableCell(endContainer)) {
|
||||||
startContainer = wrap(startContainer, 'span', {id: '_start', 'data-mce-type': 'bookmark'});
|
startContainer = wrap(startContainer, 'span', {id: '_start', 'data-mce-type': 'bookmark'});
|
||||||
endContainer = wrap(endContainer, 'span', {id: '_end', '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
|
// Split start/end
|
||||||
splitToFormatRoot(startContainer);
|
splitToFormatRoot(startContainer);
|
||||||
splitToFormatRoot(endContainer);
|
splitToFormatRoot(endContainer);
|
||||||
|
|
||||||
// Unwrap start/end to get real elements again
|
// Unwrap start/end to get real elements again
|
||||||
startContainer = unwrap(TRUE);
|
startContainer = unwrap(TRUE);
|
||||||
endContainer = unwrap();
|
endContainer = unwrap();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
startContainer = endContainer = splitToFormatRoot(startContainer);
|
startContainer = endContainer = splitToFormatRoot(startContainer);
|
||||||
}
|
}
|
||||||
@ -18448,6 +18464,10 @@ define("tinymce/UndoManager", [
|
|||||||
return trim(content);
|
return trim(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setDirty(state) {
|
||||||
|
editor.isNotDirty = !state;
|
||||||
|
}
|
||||||
|
|
||||||
function addNonTypingUndoLevel(e) {
|
function addNonTypingUndoLevel(e) {
|
||||||
self.typing = false;
|
self.typing = false;
|
||||||
self.add({}, e);
|
self.add({}, e);
|
||||||
@ -18497,9 +18517,9 @@ define("tinymce/UndoManager", [
|
|||||||
|
|
||||||
// Fire a TypingUndo event on the first character entered
|
// Fire a TypingUndo event on the first character entered
|
||||||
if (isFirstTypedCharacter && self.typing) {
|
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()) {
|
if (!editor.isDirty()) {
|
||||||
editor.isNotDirty = !data[0] || getContent() == data[0].content;
|
setDirty(data[0] && getContent() != data[0].content);
|
||||||
|
|
||||||
// Fire initial change event
|
// Fire initial change event
|
||||||
if (!editor.isNotDirty) {
|
if (!editor.isNotDirty) {
|
||||||
@ -18525,8 +18545,8 @@ define("tinymce/UndoManager", [
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If key isn't shift,ctrl,alt,capslock,metakey
|
// If key isn't Ctrl+Alt/AltGr
|
||||||
var modKey = VK.modifierPressed(e);
|
var modKey = (e.ctrlKey && !e.altKey) || e.metaKey;
|
||||||
if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !self.typing && !modKey) {
|
if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !self.typing && !modKey) {
|
||||||
self.beforeChange();
|
self.beforeChange();
|
||||||
self.typing = true;
|
self.typing = true;
|
||||||
@ -18551,6 +18571,7 @@ define("tinymce/UndoManager", [
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*eslint consistent-this:0 */
|
||||||
self = {
|
self = {
|
||||||
// Explose for debugging reasons
|
// Explose for debugging reasons
|
||||||
data: data,
|
data: data,
|
||||||
@ -18636,7 +18657,7 @@ define("tinymce/UndoManager", [
|
|||||||
editor.fire('AddUndo', args);
|
editor.fire('AddUndo', args);
|
||||||
|
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
editor.isNotDirty = false;
|
setDirty(true);
|
||||||
editor.fire('change', args);
|
editor.fire('change', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18662,7 +18683,7 @@ define("tinymce/UndoManager", [
|
|||||||
|
|
||||||
// Undo to first index then set dirty state to false
|
// Undo to first index then set dirty state to false
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
editor.isNotDirty = true;
|
setDirty(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.setContent(level.content, {format: 'raw'});
|
editor.setContent(level.content, {format: 'raw'});
|
||||||
@ -18688,6 +18709,7 @@ define("tinymce/UndoManager", [
|
|||||||
|
|
||||||
editor.setContent(level.content, {format: 'raw'});
|
editor.setContent(level.content, {format: 'raw'});
|
||||||
editor.selection.moveToBookmark(level.bookmark);
|
editor.selection.moveToBookmark(level.bookmark);
|
||||||
|
setDirty(true);
|
||||||
|
|
||||||
editor.fire('redo', {level: level});
|
editor.fire('redo', {level: level});
|
||||||
}
|
}
|
||||||
@ -28020,7 +28042,7 @@ define("tinymce/util/Quirks", [
|
|||||||
editor.on('keydown', function(e) {
|
editor.on('keydown', function(e) {
|
||||||
if (VK.metaKeyPressed(e) && (e.keyCode == 37 || e.keyCode == 39)) {
|
if (VK.metaKeyPressed(e) && (e.keyCode == 37 || e.keyCode == 39)) {
|
||||||
e.preventDefault();
|
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 = self.editorManager.get(settings.auto_focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.focus();
|
if (!editor.destroyed) {
|
||||||
|
editor.focus();
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31314,7 +31338,7 @@ define("tinymce/EditorManager", [
|
|||||||
* @property minorVersion
|
* @property minorVersion
|
||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
minorVersion: '1.9',
|
minorVersion: '1.10',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Release date of TinyMCE build.
|
* Release date of TinyMCE build.
|
||||||
@ -31322,7 +31346,7 @@ define("tinymce/EditorManager", [
|
|||||||
* @property releaseDate
|
* @property releaseDate
|
||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
releaseDate: '2015-04-05',
|
releaseDate: '2015-05-05',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collection of editor instances.
|
* Collection of editor instances.
|
||||||
|
23
src/wp-includes/js/tinymce/tinymce.min.js
vendored
23
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 = 32364;
|
|||||||
*
|
*
|
||||||
* @global string $tinymce_version
|
* @global string $tinymce_version
|
||||||
*/
|
*/
|
||||||
$tinymce_version = '4109-20150406';
|
$tinymce_version = '4110-20150505';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the required PHP version
|
* Holds the required PHP version
|
||||||
|
Loading…
Reference in New Issue
Block a user