TinyMCE: add support for IE11.
- Add the latest changes from the 3.x branch upstream.
- Reduce the number of calls to tinyMCEPopup.restoreSelection() in our custom plugins.
- Remove the deprecated execCommand("mceBeginUndoLevel");.
See #25281.
Built from https://develop.svn.wordpress.org/trunk@25748
git-svn-id: http://core.svn.wordpress.org/trunk@25661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -121,8 +121,6 @@ var wpLink;
|
||||
} else {
|
||||
wpLink.setDefaultValues();
|
||||
}
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
},
|
||||
|
||||
close : function() {
|
||||
@@ -226,7 +224,6 @@ var wpLink;
|
||||
// If the values are empty, unlink and return
|
||||
if ( ! attrs.href || attrs.href == 'http://' ) {
|
||||
if ( e ) {
|
||||
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
||||
b = ed.selection.getBookmark();
|
||||
ed.dom.remove(e, 1);
|
||||
ed.selection.moveToBookmark(b);
|
||||
@@ -236,8 +233,6 @@ var wpLink;
|
||||
return;
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
||||
|
||||
if (e == null) {
|
||||
ed.getDoc().execCommand("unlink", false, null);
|
||||
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
||||
@@ -252,7 +247,7 @@ var wpLink;
|
||||
// Sometimes WebKit lets a user create a link where
|
||||
// they shouldn't be able to. In this case, CreateLink
|
||||
// injects "#mce_temp_url#" into their content. Fix it.
|
||||
if ( $(e).text() == '#mce_temp_url#' ) {
|
||||
if ( tinymce.isWebKit && $(e).text() == '#mce_temp_url#' ) {
|
||||
ed.dom.remove(e);
|
||||
e = null;
|
||||
}
|
||||
@@ -260,16 +255,16 @@ var wpLink;
|
||||
ed.dom.setAttribs(e, attrs);
|
||||
}
|
||||
|
||||
// Don't move caret if selection was image
|
||||
// Move the caret if selection was not an image.
|
||||
if ( e && (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') ) {
|
||||
ed.focus();
|
||||
ed.selection.select(e);
|
||||
ed.selection.collapse(0);
|
||||
tinyMCEPopup.storeSelection();
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
ed.execCommand("mceEndUndoLevel");
|
||||
wpLink.close();
|
||||
ed.focus();
|
||||
},
|
||||
|
||||
updateFields : function( e, li, originalEvent ) {
|
||||
|
||||
Reference in New Issue
Block a user