From a38824135b24459e9329bd9404c3e2fe32409438 Mon Sep 17 00:00:00 2001 From: samuel-fringeli Date: Sun, 13 Aug 2023 01:59:59 +0200 Subject: [PATCH] Fix readme for more recent Electron versions (#169) Co-authored-by: Sindre Sorhus --- readme.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/readme.md b/readme.md index be01049..dd92ed8 100644 --- a/readme.md +++ b/readme.md @@ -30,11 +30,7 @@ let mainWindow; (async () => { await app.whenReady(); - mainWindow = new BrowserWindow({ - webPreferences: { - spellcheck: true - } - }); + mainWindow = new BrowserWindow(); })(); ``` @@ -66,11 +62,7 @@ let mainWindow; (async () => { await app.whenReady(); - mainWindow = new BrowserWindow({ - webPreferences: { - spellcheck: true - } - }); + mainWindow = new BrowserWindow(); })(); ``` @@ -127,7 +119,7 @@ Default: `true` Show the `Learn Spelling {selection}` menu item when right-clicking text. -Even if `true`, the `spellcheck` preference in browser window must still be enabled. It will also only show when right-clicking misspelled words. +The spellcheck will only show when right-clicking misspelled words. #### showLookUpSelection @@ -279,7 +271,7 @@ Even though you include an action, it will still only be shown/enabled when appr `MenuItem` labels may contain the placeholder `{selection}` which will be replaced by the currently selected text as described in [`options.labels`](#labels). -To get spellchecking, “Correct Automatically”, and “Learn Spelling” in the menu, please enable the `spellcheck` preference in browser window: `new BrowserWindow({webPreferences: {spellcheck: true}})` +To get spellchecking, “Correct Automatically”, and “Learn Spelling” in the menu, make sure you have not disabled the `spellcheck` option (it's `true` by default) in `BrowserWindow`. The following options are ignored when `menu` is used: