equal
deleted
inserted
replaced
53 |
53 |
54 update : function() { |
54 update : function() { |
55 var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; |
55 var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; |
56 |
56 |
57 if (f.src.value === '') { |
57 if (f.src.value === '') { |
58 ed.dom.remove(ed.selection.getNode()); |
58 if (ed.selection.getNode().nodeName == 'IMG') { |
59 ed.execCommand('mceRepaint'); |
59 ed.dom.remove(ed.selection.getNode()); |
|
60 ed.execCommand('mceRepaint'); |
|
61 } |
|
62 |
60 tinyMCEPopup.close(); |
63 tinyMCEPopup.close(); |
61 return; |
64 return; |
62 } |
65 } |
63 |
66 |
64 if (!ed.settings.inline_styles) { |
67 if (!ed.settings.inline_styles) { |
81 el = ed.selection.getNode(); |
84 el = ed.selection.getNode(); |
82 |
85 |
83 if (el && el.nodeName == 'IMG') { |
86 if (el && el.nodeName == 'IMG') { |
84 ed.dom.setAttribs(el, args); |
87 ed.dom.setAttribs(el, args); |
85 } else { |
88 } else { |
86 ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />'); |
89 ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />', {skip_undo : 1}); |
87 ed.dom.setAttribs('__mce_tmp', args); |
90 ed.dom.setAttribs('__mce_tmp', args); |
88 ed.dom.setAttrib('__mce_tmp', 'id', ''); |
91 ed.dom.setAttrib('__mce_tmp', 'id', ''); |
|
92 ed.undoManager.add(); |
89 } |
93 } |
90 |
94 |
91 tinyMCEPopup.close(); |
95 tinyMCEPopup.close(); |
92 }, |
96 }, |
93 |
97 |