From 1f3cb1910117c46c5e651df8982f369a3f249e1f Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 22 Dec 2025 17:04:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Editor/Editor.razor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs index ce6d38cf..b22c06c8 100644 --- a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs +++ b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs @@ -32,7 +32,7 @@ public partial class Editor public string? PlaceHolder { get; set; } /// - /// 获得/设置 是否直接显示为富文本编辑框 + /// 获得/设置 是否直接显示为富文本编辑框 默认 false /// [Parameter] public bool IsEditor { get; set; } From 76e1d44c0b58a0c6a28ad201462c4c4036b591ac Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 22 Dec 2025 17:04:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=E7=B2=BE=E7=AE=80=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Editor/Editor.razor.js | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js index f925dad6..d4ad2219 100644 --- a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js +++ b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js @@ -3,10 +3,6 @@ import { addLink, addScript } from '../../../BootstrapBlazor/modules/utility.js' import Data from '../../../BootstrapBlazor/modules/data.js' import EventHandler from '../../../BootstrapBlazor/modules/event-handler.js' -if (window.BootstrapBlazor === void 0) { - window.BootstrapBlazor = {}; -} - export async function init(id, invoker, methodGetPluginAttrs, methodClickPluginItem, height, value, lang, langUrl, hasUpload) { const el = document.getElementById(id) if (el === null) { @@ -45,7 +41,6 @@ export async function init(id, invoker, methodGetPluginAttrs, methodClickPluginI const showSubmit = el.getAttribute("data-bb-submit") === "true" option.toolbar = toolbar; - reloadCallbacks(id, option); if (hasUpload) { option.callbacks.onImageUpload = async files => { editor.files = files @@ -142,23 +137,6 @@ export async function init(id, invoker, methodGetPluginAttrs, methodClickPluginI await initEditor(); } -const reloadCallbacks = (id, option) => { - const events = ['Blur', 'BlurCodeview', 'Change', 'ChangeCodeview', 'DialogShown', 'Enter', 'Focus', 'ImageUpload', 'ImageLinkInsert', 'ImageUploadError', 'Init', 'Keydown', 'Keyup', 'Mousedown', 'Mouseup', 'Paste', 'Scroll']; - - 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) { const editor = Data.get(id) if (editor.$editor) { From d46363c9c4df6b7796faeeb7898ebd7bf7899c7e Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 22 Dec 2025 17:05:11 +0800 Subject: [PATCH 3/3] chore: bump version 10.0.2 --- .../BootstrapBlazor.SummerNote.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj b/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj index 6abcc953..992de3d2 100644 --- a/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj +++ b/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj @@ -1,7 +1,7 @@ - 10.0.1 + 10.0.2