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];
|
||||
}
|
||||
|
||||
function isEditorBody(elm) {
|
||||
return elm === editor.getBody();
|
||||
}
|
||||
|
||||
editor.on('init', function() {
|
||||
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') {
|
||||
dom.rename(li, 'DT');
|
||||
return true;
|
||||
|
@ -602,6 +610,10 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||
tinymce.each(getSelectedListItems(), function(li) {
|
||||
var node, rootList;
|
||||
|
||||
if (isEditorBody(li.parentNode)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEmpty(li)) {
|
||||
outdent(li);
|
||||
return;
|
||||
|
@ -622,6 +634,10 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||
function toggleList(listName) {
|
||||
var parentList = dom.getParent(selection.getStart(), 'OL,UL,DL');
|
||||
|
||||
if (isEditorBody(parentList)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (parentList) {
|
||||
if (parentList.nodeName == listName) {
|
||||
removeList(listName);
|
||||
|
@ -698,17 +714,22 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||
|
||||
dom.remove(fromElm);
|
||||
|
||||
if (isEmpty(ul)) {
|
||||
if (isEmpty(ul) && !isEditorBody(ul)) {
|
||||
dom.remove(ul);
|
||||
}
|
||||
}
|
||||
|
||||
if (selection.isCollapsed()) {
|
||||
var li = dom.getParent(selection.getStart(), 'LI');
|
||||
var li = dom.getParent(selection.getStart(), 'LI'), ul, rng, otherLi;
|
||||
|
||||
if (li) {
|
||||
var rng = selection.getRng(true);
|
||||
var otherLi = dom.getParent(findNextCaretContainer(rng, isForward), 'LI');
|
||||
ul = li.parentNode;
|
||||
if (isEditorBody(ul) && dom.isEmpty(ul)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
rng = selection.getRng(true);
|
||||
otherLi = dom.getParent(findNextCaretContainer(rng, isForward), 'LI');
|
||||
|
||||
if (otherLi && otherLi != li) {
|
||||
var bookmark = createBookmark(rng);
|
||||
|
@ -723,7 +744,7 @@ tinymce.PluginManager.add('lists', function(editor) {
|
|||
|
||||
return true;
|
||||
} else if (!otherLi) {
|
||||
if (!isForward && removeList(li.parentNode.nodeName)) {
|
||||
if (!isForward && removeList(ul.nodeName)) {
|
||||
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
|
||||
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() {
|
||||
var selection = editor.selection;
|
||||
|
||||
if (itemName == "bullist") {
|
||||
selection.selectorChanged('ul > li', function(state, args) {
|
||||
function setActiveItem(name) {
|
||||
return function(state, args) {
|
||||
var nodeName, i = args.parents.length;
|
||||
|
||||
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") {
|
||||
selection.selectorChanged('ol > li', function(state, args) {
|
||||
var nodeName, i = args.parents.length;
|
||||
|
||||
while (i--) {
|
||||
nodeName = args.parents[i].nodeName;
|
||||
if (nodeName == "OL" || nodeName == "UL") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
item.active(state && nodeName == "OL");
|
||||
});
|
||||
selection.selectorChanged('ol > li', setActiveItem("OL"));
|
||||
}
|
||||
|
||||
if (item.settings.stateSelector) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @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.
|
||||
|
@ -18,7 +18,7 @@ $wp_db_version = 35465;
|
|||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '4206-20151020';
|
||||
$tinymce_version = '4207-20151107';
|
||||
|
||||
/**
|
||||
* Holds the required PHP version
|
||||
|
|
Loading…
Reference in New Issue