Nativefier: Better integrate Electron>=8.1.1's spell checking

Created on 3 Nov 2016  ·  18Comments  ·  Source: jiahaog/nativefier

applications built with nativefier don't perform spell checking, which is unexpected, and out of alignment with how sites work in-browser.

it would be nice if something like the electron-spell-check-provider package was used to enable spell checking on fields.


EDIT from @ronjouch on 2019/03/11: see https://github.com/jiahaog/nativefier/issues/283#issuecomment-597668972 , Electron ≥ 8.1.1 supports spellchecking natively, and it's (crudely) usable by simply asking for it through BrowserOptions. However, it lacks basic features (an easy-to-use flag, a context menu letting users accept suggestions and switch languages, and maybe enabling spellcheck by default), so this is what this issue is about now.

EDIT from @ronjouch on 2020/04/22: see https://github.com/sindresorhus/electron-context-menu/releases/tag/v1.0.0 , [email protected] (which I bumped Nativefier 8.0.7 to) includes _"built-in support for spellchecking (https://github.com/sindresorhus/electron-context-menu/pull/94), see https://github.com/sindresorhus/electron-context-menu/commit/71c5d2e1fb28f13fea35b1be076909f463826f55"_ . Maybe worth a look if you're interested in contributing!

feature-request

Most helpful comment

Spellcheck is enabled on v9.0.0. But, how to change the language?

All 18 comments

Would love to make this happen.

@jiahaog Can you point me in the right direction for completing this? 👍

Ping @globau @eladnava: @Thatkookooguy tried implemented spell checking, maybe see https://github.com/jiahaog/nativefier/issues/222 if you feel like collaborate on something.

I would also like to voice my support for this. And was wondering if @ronjouch you tried using something like: https://github.com/electron-userland/electron-spellchecker

It seems that this library will work on any regular inputs as it listens to the document input event. The only situation where this will cause problems would be for applications that modify the input event / block it's event propagation. And there isn't anything that can be done about that really.

+1 this is a deal breaker for us if it's not available

Would love to see this. If there is a workaround or forks w/ support, do please share.

+1 it would be great if html spellcheck would be supported

Any news about this ?

+1 @jiahaog @ronjouch

+1 this is a deal breaker for us if it's not available

I would really like to see this feature.

You can enable spellchecking on your own now that this pr is merged into Electron.

You'll need to pass a parameter to upgrade the version of Electron from the default, and another to enable the feature.

--browserwindow-options '{ "webPreferences": { "spellcheck": true } }' -e 8.1.1

@e1ven Legend! Thanks for that 💯

FYI you will need to upgrade the version of electron-packager that nativefier depends on to the latest, otherwise bundling any Electron version above 5 will crash. Run this in the nativefier directory:

npm install electron-packager@latest

Then, run nativefier again to regenerate the app.

Thanks @e1ven @eladnava 🙂. Regarding the need to upgrade electron-packager, I encourage everyone interested to give branch ts a try, it ships with the latest everything, including electron-packager and electron 8.1.1. I just confirmed spellchecking works in this branch with nativefier --browserwindow-options '{ "webPreferences": { "spellcheck": true } }' 'https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea' .

To those of you willing to give this branch a try, go ahead: it's ready to ship, currently being reviewed by Jia, will ship soon, so testing is extremely welcome. See the build instructions at https://github.com/jiahaog/nativefier/pull/898#issuecomment-581062794 , and please report any issues with a [ts] prefix.

Then, once #898 ships, help welcome to make this feature actually usable: a new flag to enable it more easily than passing browserwindow-options, maybe make it default, and adding context menu entries to accept corrections and switch languages.

Thanks @ronjouch, gave ts a try, seems to work well. Only issue is #921, but that's present in master as well. Thanks for all your hard work on this awesome project!

spellcheck works great but how do we enable dictionary suggestions in the context menu for things spell check marks as wrong

I just rebuilt an app with the --browserwindow-options '{ "webPreferences": { "spellcheck": true } }' option and seems like it did not make any difference. The electron version is 8.2.0
Do I still need to install any "latest" version in order to make the spellcheck work?

Edited later:

Actually it does underline misspelled words now. Right click on them does not suggest any corrections though but knowing which ones got screwed up by my sausage fingers is helpful anyways.

Everybody interested, see https://github.com/sindresorhus/electron-context-menu/releases/tag/v1.0.0 , [email protected] (which I bumped Nativefier 8.0.7 to) includes _"built-in support for spellchecking (https://github.com/sindresorhus/electron-context-menu/pull/94), see https://github.com/sindresorhus/electron-context-menu/commit/71c5d2e1fb28f13fea35b1be076909f463826f55"_ .

Worth a look for those of you interested in contributing!

Spellcheck is enabled on v9.0.0. But, how to change the language?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ranzou06 picture ranzou06  ·  3Comments

jjgalvez picture jjgalvez  ·  3Comments

simonweil picture simonweil  ·  5Comments

theman8631 picture theman8631  ·  5Comments

marcelocecin picture marcelocecin  ·  4Comments