mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
TinyMCE: update to 4.2.7. Changelog: http://www.tinymce.com/develop/changelog/?ctrl=version&act=view&pr_id=1&vr_id=888
Fixes #34620. Built from https://develop.svn.wordpress.org/trunk@35574 git-svn-id: http://core.svn.wordpress.org/trunk@35538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c0a3348487
commit
9fb7dcc30d
@ -30,6 +30,10 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||||||
return node && !!editor.schema.getTextBlockElements()[node.nodeName];
|
return node && !!editor.schema.getTextBlockElements()[node.nodeName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isEditorBody(elm) {
|
||||||
|
return elm === editor.getBody();
|
||||||
|
}
|
||||||
|
|
||||||
editor.on('init', function() {
|
editor.on('init', function() {
|
||||||
var dom = editor.dom, selection = editor.selection;
|
var dom = editor.dom, selection = editor.selection;
|
||||||
|
|
||||||
@ -318,6 +322,10 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isEditorBody(ul)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (li.nodeName == 'DD') {
|
if (li.nodeName == 'DD') {
|
||||||
dom.rename(li, 'DT');
|
dom.rename(li, 'DT');
|
||||||
return true;
|
return true;
|
||||||
@ -602,6 +610,10 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||||||
tinymce.each(getSelectedListItems(), function(li) {
|
tinymce.each(getSelectedListItems(), function(li) {
|
||||||
var node, rootList;
|
var node, rootList;
|
||||||
|
|
||||||
|
if (isEditorBody(li.parentNode)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (isEmpty(li)) {
|
if (isEmpty(li)) {
|
||||||
outdent(li);
|
outdent(li);
|
||||||
return;
|
return;
|
||||||
@ -622,6 +634,10 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||||||
function toggleList(listName) {
|
function toggleList(listName) {
|
||||||
var parentList = dom.getParent(selection.getStart(), 'OL,UL,DL');
|
var parentList = dom.getParent(selection.getStart(), 'OL,UL,DL');
|
||||||
|
|
||||||
|
if (isEditorBody(parentList)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (parentList) {
|
if (parentList) {
|
||||||
if (parentList.nodeName == listName) {
|
if (parentList.nodeName == listName) {
|
||||||
removeList(listName);
|
removeList(listName);
|
||||||
@ -698,17 +714,22 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||||||
|
|
||||||
dom.remove(fromElm);
|
dom.remove(fromElm);
|
||||||
|
|
||||||
if (isEmpty(ul)) {
|
if (isEmpty(ul) && !isEditorBody(ul)) {
|
||||||
dom.remove(ul);
|
dom.remove(ul);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selection.isCollapsed()) {
|
if (selection.isCollapsed()) {
|
||||||
var li = dom.getParent(selection.getStart(), 'LI');
|
var li = dom.getParent(selection.getStart(), 'LI'), ul, rng, otherLi;
|
||||||
|
|
||||||
if (li) {
|
if (li) {
|
||||||
var rng = selection.getRng(true);
|
ul = li.parentNode;
|
||||||
var otherLi = dom.getParent(findNextCaretContainer(rng, isForward), 'LI');
|
if (isEditorBody(ul) && dom.isEmpty(ul)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
rng = selection.getRng(true);
|
||||||
|
otherLi = dom.getParent(findNextCaretContainer(rng, isForward), 'LI');
|
||||||
|
|
||||||
if (otherLi && otherLi != li) {
|
if (otherLi && otherLi != li) {
|
||||||
var bookmark = createBookmark(rng);
|
var bookmark = createBookmark(rng);
|
||||||
@ -723,7 +744,7 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else if (!otherLi) {
|
} else if (!otherLi) {
|
||||||
if (!isForward && removeList(li.parentNode.nodeName)) {
|
if (!isForward && removeList(ul.nodeName)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1411,7 +1411,9 @@ define("tinymce/pasteplugin/WordFilter", [
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Serialize DOM back to HTML
|
// Serialize DOM back to HTML
|
||||||
e.content = new Serializer({}, schema).serialize(rootNode);
|
e.content = new Serializer({
|
||||||
|
validate: settings.validate
|
||||||
|
}, schema).serialize(rootNode);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -41,8 +41,8 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
|||||||
function bindSelectorChanged() {
|
function bindSelectorChanged() {
|
||||||
var selection = editor.selection;
|
var selection = editor.selection;
|
||||||
|
|
||||||
if (itemName == "bullist") {
|
function setActiveItem(name) {
|
||||||
selection.selectorChanged('ul > li', function(state, args) {
|
return function(state, args) {
|
||||||
var nodeName, i = args.parents.length;
|
var nodeName, i = args.parents.length;
|
||||||
|
|
||||||
while (i--) {
|
while (i--) {
|
||||||
@ -52,23 +52,16 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
item.active(state && nodeName == "UL");
|
item.active(state && nodeName == name);
|
||||||
});
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemName == "bullist") {
|
||||||
|
selection.selectorChanged('ul > li', setActiveItem("UL"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemName == "numlist") {
|
if (itemName == "numlist") {
|
||||||
selection.selectorChanged('ol > li', function(state, args) {
|
selection.selectorChanged('ol > li', setActiveItem("OL"));
|
||||||
var nodeName, i = args.parents.length;
|
|
||||||
|
|
||||||
while (i--) {
|
|
||||||
nodeName = args.parents[i].nodeName;
|
|
||||||
if (nodeName == "OL" || nodeName == "UL") {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
item.active(state && nodeName == "OL");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.settings.stateSelector) {
|
if (item.settings.stateSelector) {
|
||||||
|
File diff suppressed because one or more lines are too long
24
wp-includes/js/tinymce/tinymce.min.js
vendored
24
wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-beta3-35573';
|
$wp_version = '4.4-beta3-35574';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
@ -18,7 +18,7 @@ $wp_db_version = 35465;
|
|||||||
*
|
*
|
||||||
* @global string $tinymce_version
|
* @global string $tinymce_version
|
||||||
*/
|
*/
|
||||||
$tinymce_version = '4206-20151020';
|
$tinymce_version = '4207-20151107';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the required PHP version
|
* Holds the required PHP version
|
||||||
|
Loading…
Reference in New Issue
Block a user