mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-12-18 23:58:26 +08:00
Reenable basic spellchecking
This commit is contained in:
parent
a9b73e0b91
commit
9c04a40782
1 changed files with 7 additions and 14 deletions
|
|
@ -119,15 +119,13 @@ class Spellchecker {
|
||||||
};
|
};
|
||||||
|
|
||||||
isMisspelled = (word: string) => {
|
isMisspelled = (word: string) => {
|
||||||
/*
|
|
||||||
if (!this.handler) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if ({}.hasOwnProperty.call(this._customDict, word)) {
|
if ({}.hasOwnProperty.call(this._customDict, word)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return !(this.handler as any).handleElectronSpellCheck([word]);
|
|
||||||
*/
|
return webFrame.isWordMisspelled(word)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
learnWord = word => {
|
learnWord = word => {
|
||||||
|
|
@ -147,14 +145,9 @@ class Spellchecker {
|
||||||
};
|
};
|
||||||
|
|
||||||
appendSpellingItemsToMenu = async ({ menu, word, onCorrect, onDidLearn }) => {
|
appendSpellingItemsToMenu = async ({ menu, word, onCorrect, onDidLearn }) => {
|
||||||
//console.log(this._win.webContents.session.availableSpellCheckerLanguages);
|
|
||||||
|
|
||||||
// TODO: Re-Add Spellchecking
|
|
||||||
//console.log(webFrame.isWordMisspelled(word));
|
|
||||||
//console.log(webFrame.getWordSuggestions(word));
|
|
||||||
/*
|
|
||||||
if (this.isMisspelled(word)) {
|
if (this.isMisspelled(word)) {
|
||||||
const corrections = await this.handler.currentSpellchecker.getCorrectionsForMisspelling(word);
|
const corrections = webFrame.getWordSuggestions(word);
|
||||||
if (corrections.length > 0) {
|
if (corrections.length > 0) {
|
||||||
corrections.forEach(correction => {
|
corrections.forEach(correction => {
|
||||||
menu.append(
|
menu.append(
|
||||||
|
|
@ -183,7 +176,7 @@ class Spellchecker {
|
||||||
menu.append(new MenuItem({ type: 'separator' }));
|
menu.append(new MenuItem({ type: 'separator' }));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new Spellchecker();
|
export default new Spellchecker();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue