From f94ea4f18e229766f4bed498a8043322c0b36367 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sun, 21 Dec 2025 19:11:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=AD=89=E4=BA=8B=E4=BB=B6=E6=97=A0=E5=93=8D=E5=BA=94=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Editor/Editor.razor.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js index 82b241c1..f925dad6 100644 --- a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js +++ b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js @@ -145,13 +145,18 @@ export async function init(id, invoker, methodGetPluginAttrs, methodClickPluginI const reloadCallbacks = (id, option) => { const events = ['Blur', 'BlurCodeview', 'Change', 'ChangeCodeview', 'DialogShown', 'Enter', 'Focus', 'ImageUpload', 'ImageLinkInsert', 'ImageUploadError', 'Init', 'Keydown', 'Keyup', 'Mousedown', 'Mouseup', 'Paste', 'Scroll']; - events.forEach(event => { - option.callbacks[`on${event}`] = function () { - const callbacks = window.BootstrapBlazor?.SummerNote?.callbacks; - const cb = callbacks?.find(i => i.id === id); - cb?.[`on${event}`]?.apply(this, arguments); - }; - }); + const callbacks = window.BootstrapBlazor?.SummerNote?.callbacks; + const cb = callbacks?.find(i => i.id === id); + if (cb) { + events.forEach(event => { + const method = cb[`on${event}`]; + if (method) { + option.callbacks[`on${event}`] = function () { + method.apply(this, arguments); + }; + } + }); + } } export function update(id, val) { From 5c08b946bc992d41fce34103c6533b166d7c090e Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sun, 21 Dec 2025 19:12:06 +0800 Subject: [PATCH 2/2] chore: bump version 10.0.1 --- .../BootstrapBlazor.SummerNote.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj b/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj index 0e9163fc..6abcc953 100644 --- a/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj +++ b/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj @@ -1,5 +1,9 @@ + + 10.0.1 + + Bootstrap Blazor WebAssembly wasm UI Components Editor SummerNote Bootstrap UI components extensions of Editor