Skip to content

Commit

Permalink
Fix readme for more recent Electron versions (#169)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
samuel-fringeli and sindresorhus committed Aug 12, 2023
1 parent b150d0a commit a388241
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions readme.md
Expand Up @@ -30,11 +30,7 @@ let mainWindow;
(async () => {
await app.whenReady();

mainWindow = new BrowserWindow({
webPreferences: {
spellcheck: true
}
});
mainWindow = new BrowserWindow();
})();
```

Expand Down Expand Up @@ -66,11 +62,7 @@ let mainWindow;
(async () => {
await app.whenReady();

mainWindow = new BrowserWindow({
webPreferences: {
spellcheck: true
}
});
mainWindow = new BrowserWindow();
})();
```

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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:

Expand Down

0 comments on commit a388241

Please sign in to comment.