X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=Roo%2Fbootstrap%2Fform%2FHtmlEditorToolbar%2FStandard.js;h=dcea277dd73ca66a8cc8c84a8d45467067088c72;hp=1ae985461ba3fcd60cdb4b88d7c63094c08e3f1a;hb=d6ef67a635e53c5d2d29c727792c155b41f263f1;hpb=fbd67bf118fba854720a4802e23c9a017d02c036 diff --git a/Roo/bootstrap/form/HtmlEditorToolbar/Standard.js b/Roo/bootstrap/form/HtmlEditorToolbar/Standard.js index 1ae985461b..dcea277dd7 100644 --- a/Roo/bootstrap/form/HtmlEditorToolbar/Standard.js +++ b/Roo/bootstrap/form/HtmlEditorToolbar/Standard.js @@ -253,12 +253,13 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp var reader = new FileReader(); reader.addEventListener('load', (function() { if (bl) { + var oldSrc = bl.image_src; bl.image_src = reader.result; //bl.caption = f.name; bl.updateElement(sn); this.editor.syncValue(); editor.owner.fireEvent('editorevent', editor.owner, false); - editor.owner.fireEvent('imageupdate', editor.owner, sn); + editor.owner.fireEvent('imageupdate', editor.owner, sn, oldSrc); // we only do the first file!! and replace. return; } @@ -274,10 +275,11 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp } // just a standard img.. if (sn && sn.tagName.toUpperCase() == 'IMG') { + var oldSrc = sn.src; sn.src = reader.result; this.editor.syncValue(); editor.owner.fireEvent('editorevent', editor.owner, false); - editor.owner.fireEvent('imageupdate', editor.owner, sn); + editor.owner.fireEvent('imageupdate', editor.owner, sn, oldSrc); return; } editor.insertAtCursor('');