From b7a599acdf7557942c1ae077fc30a48bf8407327 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 17 Feb 2023 15:37:37 +0800 Subject: [PATCH] sync values before triggering delete --- .../Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html b/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html index 21a44fd4e4..e77a2a58f0 100644 --- a/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html +++ b/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html @@ -231,6 +231,7 @@ if (!far.length) { if (fire_add) { + this.editor.syncValue(); editor.owner.fireEvent('editorevent', editor.owner, false); editor.owner.fireEvent('imageadd', editor.owner, false); } @@ -255,6 +256,7 @@ 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); // we only do the first file!! and replace. @@ -273,6 +275,7 @@ // just a standard img.. if (sn && sn.tagName.toUpperCase() == 'IMG') { sn.src = reader.result; + this.editor.syncValue(); editor.owner.fireEvent('editorevent', editor.owner, false); editor.owner.fireEvent('imageupdate', editor.owner, sn); return; @@ -445,6 +448,7 @@ selection.addRange(range); this.updateToolbar(null, null, null); if (sn.tagName.toUpperCase() == 'FIGURE') { + this.editor.syncValue(); this.editor.fireEvent('imagedelete', this.editor, sn); } @@ -469,6 +473,7 @@ selection.removeAllRanges(); selection.addRange(range); if (sn.tagName.toUpperCase() == 'IMG"') { + this.editor.syncValue(); this.editor.fireEvent('imagedelete', this.editor, sn); } -- 2.39.2