muan / scribble-electron

:boom: Electron & LocalStorage powered note taking app.
66 stars 7 forks source link

spelling correction #4

Open Haroenv opened 8 years ago

Haroenv commented 8 years ago

https://github.com/electron/electron/pull/942

require('web-frame').setSpellCheckProvider("en-US", true, {
  spellCheck: function(text) {
    return !(require('spellchecker').isMisspelled(text));
  }
});

better would be to get navigator.language and use that as a language, but I'm not sure if that'll be reported correctly.

Something which I really like about Safari, but Chrome somehow does wrong is spell checking, so it could be impossible to have it "guess" what language you're writing in and adapting the spelling. <-- would be great

muan commented 8 years ago

Perhaps app.getLocale() can work? I tried briefly and the webframe script crashed the app :/