Roo/bootstrap/form/HtmlEditorToolbar/Standard.js
authorAlan <alan@roojs.com>
Fri, 17 Feb 2023 05:00:13 +0000 (13:00 +0800)
committerAlan <alan@roojs.com>
Fri, 17 Feb 2023 05:00:13 +0000 (13:00 +0800)
Roo/bootstrap/form/HtmlEditorToolbar/Standard.js

index 6af57aa..f79c1b6 100644 (file)
@@ -249,8 +249,8 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
                 bl.image_src = reader.result;
                 //bl.caption = f.name;
                 bl.updateElement(sn);
-                editor.owner.fireEvent('editorevent', editor.owner, false);
-                editor.owner.fireEvent('imageupdate', editor.owner, false);
+                editor.owner.fireEvent('editorevent', editor.owner, sn);
+                editor.owner.fireEvent('imageupdate', editor.owner, sn);
                 // we only do the first file!! and replace.
                 return;
             }
@@ -269,8 +269,8 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
             // just a standard img..
             if (sn && sn.tagName.toUpperCase() == 'IMG') {
                 sn.src = reader.result;
-                editor.owner.fireEvent('editorevent', editor.owner, false);
-                editor.owner.fireEvent('imageupdate', editor.owner, false);
+                editor.owner.fireEvent('editorevent', editor.owner, sn);
+                editor.owner.fireEvent('imageupdate', editor.owner, sn);
                 return;
             }
             editor.insertAtCursor('<img src="' + reader.result +'">');