From 3762eb1aac762b4fa4589379ed2753ba5267a835 Mon Sep 17 00:00:00 2001 From: liu971227-sys <248239659+liu971227-sys@users.noreply.github.com> Date: Sun, 15 Feb 2026 23:14:02 +0800 Subject: [PATCH] Enable Chromium spellchecker for webview/editor --- src/components/BoostHubWebview.tsx | 4 +++- src/electron/windows.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/BoostHubWebview.tsx b/src/components/BoostHubWebview.tsx index 337a49bf30..4652e75101 100644 --- a/src/components/BoostHubWebview.tsx +++ b/src/components/BoostHubWebview.tsx @@ -413,7 +413,9 @@ const BoostHubWebview = ({ tabIndex={-1} useragent={boostHubWebViewUserAgent} preload={boostHubPreloadUrl} - webpreferences='contextIsolation=no' + // Electron's webview tag uses a BrowserWindow-style feature string. + // Keep contextIsolation off (existing behavior) and enable spellcheck. + webpreferences='contextIsolation=no,spellcheck=yes' /> ) diff --git a/src/electron/windows.ts b/src/electron/windows.ts index c999e11d30..1f68ab76bb 100644 --- a/src/electron/windows.ts +++ b/src/electron/windows.ts @@ -32,6 +32,9 @@ export function createAWindow( nodeIntegration: true, webSecurity: !dev, webviewTag: true, + // Ensure Chromium's spellchecker is available to renderer/webviews. + // The editor still controls actual usage via `spellcheck` attributes/settings. + spellcheck: true, enableRemoteModule: true, contextIsolation: false, preload: dev