Closed mlalkaka closed 5 years ago
Tested this branch on Abstract's electron app in electron 5, and it's confirmed working. Thanks @mlalkaka!
Thank you very much!
Thank you @mlalkaka.
Though, I found out that spell checking is not working on Windows because in the SpellCheckProvider
function handleElectronSpellCheck(words, callback)
, the callback is never called on Windows and hence no squiggly red lines will appear.
It's only called on macOS. I simply added callback(misspelled);
to the bottom of the function and it worked properly.
Starting with Electron 5.0.0, the function
webFrame.setSpellCheckProvider
has a different signature, in order to support asynchronous spell checkers. For more information on this change in Electron, see electron/electron#14032.This diff updates
SpellCheckHandler
to use the new interface if running on Electron 5.0.0 and above. However, it still checks the spelling synchronously like before.If running on Electron versions below 5.0.0, the
SpellCheckHandler
still works.Closes #144.