Skip to content

Commit 0eaaa96

Browse files
committed
Enable Chromium spellchecker for webview/editor
1 parent 6a3002d commit 0eaaa96

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/components/BoostHubWebview.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,9 @@ const BoostHubWebview = ({
413413
tabIndex={-1}
414414
useragent={boostHubWebViewUserAgent}
415415
preload={boostHubPreloadUrl}
416-
webpreferences='contextIsolation=no'
416+
// Electron's webview tag uses a BrowserWindow-style feature string.
417+
// Keep contextIsolation off (existing behavior) and enable spellcheck.
418+
webpreferences='contextIsolation=no,spellcheck=yes'
417419
/>
418420
</Container>
419421
)

src/electron/windows.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export function createAWindow(
3232
nodeIntegration: true,
3333
webSecurity: !dev,
3434
webviewTag: true,
35+
// Ensure Chromium's spellchecker is available to renderer/webviews.
36+
// The editor still controls actual usage via `spellcheck` attributes/settings.
37+
spellcheck: true,
3538
enableRemoteModule: true,
3639
contextIsolation: false,
3740
preload: dev

0 commit comments

Comments
 (0)