disable spellchecker
This commit is contained in:
parent
4e453903f2
commit
8f03d7f19e
|
@ -1,4 +1,4 @@
|
||||||
const { app, Menu, BrowserWindow, shell } = require("electron");
|
const { app, Menu, MenuItem, BrowserWindow, shell } = require("electron");
|
||||||
|
|
||||||
// Keep a global reference of the window object, if you don't, the window will
|
// Keep a global reference of the window object, if you don't, the window will
|
||||||
// be closed automatically when the JavaScript object is garbage collected.
|
// be closed automatically when the JavaScript object is garbage collected.
|
||||||
|
@ -12,6 +12,9 @@ function createWindow() {
|
||||||
title: "Sengi",
|
title: "Sengi",
|
||||||
backgroundColor: "#131925",
|
backgroundColor: "#131925",
|
||||||
useContentSize: true,
|
useContentSize: true,
|
||||||
|
webPreferences: {
|
||||||
|
spellcheck: false
|
||||||
|
}
|
||||||
// webPreferences: {
|
// webPreferences: {
|
||||||
// contextIsolation: true,
|
// contextIsolation: true,
|
||||||
// nodeIntegration: false,
|
// nodeIntegration: false,
|
||||||
|
@ -156,6 +159,30 @@ function createWindow() {
|
||||||
// when you should delete the corresponding element.
|
// when you should delete the corresponding element.
|
||||||
win = null;
|
win = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// win.webContents.on('context-menu', (event, params) => {
|
||||||
|
// const menu = new Menu();
|
||||||
|
|
||||||
|
// // Add each spelling suggestion
|
||||||
|
// for (const suggestion of params.dictionarySuggestions) {
|
||||||
|
// menu.append(new MenuItem({
|
||||||
|
// label: suggestion,
|
||||||
|
// click: () => mainWindow.webContents.replaceMisspelling(suggestion)
|
||||||
|
// }));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Allow users to add the misspelled word to the dictionary
|
||||||
|
// if (params.misspelledWord) {
|
||||||
|
// menu.append(
|
||||||
|
// new MenuItem({
|
||||||
|
// label: 'Add to dictionary',
|
||||||
|
// click: () => mainWindow.webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord)
|
||||||
|
// }));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// menu.popup();
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
app.commandLine.appendSwitch("force-color-profile", "srgb");
|
app.commandLine.appendSwitch("force-color-profile", "srgb");
|
||||||
|
|
Loading…
Reference in New Issue