diff -r c433348f3628 -r 31c23016ab62 includes/clientside/tinymce/plugins/advimage/js/image.js
--- a/includes/clientside/tinymce/plugins/advimage/js/image.js Fri Feb 22 12:51:53 2008 -0500
+++ b/includes/clientside/tinymce/plugins/advimage/js/image.js Sun Feb 24 12:50:52 2008 -0500
@@ -91,8 +91,11 @@
var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
if (f.src.value === '') {
- ed.dom.remove(ed.selection.getNode());
- ed.execCommand('mceRepaint');
+ if (ed.selection.getNode().nodeName == 'IMG') {
+ ed.dom.remove(ed.selection.getNode());
+ ed.execCommand('mceRepaint');
+ }
+
tinyMCEPopup.close();
return;
}
@@ -165,9 +168,10 @@
if (el && el.nodeName == 'IMG') {
ed.dom.setAttribs(el, args);
} else {
- ed.execCommand('mceInsertContent', false, '');
+ ed.execCommand('mceInsertContent', false, '', {skip_undo : 1});
ed.dom.setAttribs('__mce_tmp', args);
ed.dom.setAttrib('__mce_tmp', 'id', '');
+ ed.undoManager.add();
}
tinyMCEPopup.close();