electron-spellchecker icon indicating copy to clipboard operation
electron-spellchecker copied to clipboard

Add to Dictionary

Open Camyll opened this issue 8 years ago • 11 comments

Why is it that add to dictionary is only enabled on macs? Also, even if I try and add to dictionary on my mac, it doesn't do anything.

Camyll avatar Jan 05 '17 23:01 Camyll

I'm having the same issue. This error is thrown:

Error: Could not call remote function 'replaceMisspelling'. Check that the function signature is correct. Underlying error: Error processing argument at index 0, conversion failure from undefined
    at callFunction 

alexbrazier avatar Feb 03 '17 16:02 alexbrazier

The same question... Actually method spellCheckHandler.addToDictionary(text) can be replaced with spellCheckHandler.currentSpellchecker.add(text), and it works for Windows. But new word is saved only for current application session. After reload the word is missing and highlighted.

clusterberries avatar Apr 17 '17 13:04 clusterberries

@clusterberries So theoretically you could save an array of the added words and re-add them at the beginning each session?

Nantris avatar Apr 27 '17 15:04 Nantris

If you're doing this (with or without saving across sessions) and could share a snippet of code showing how to implement as simple as it sounds, I would be most appreciative.

Nantris avatar Apr 27 '17 15:04 Nantris

@Slapbox I've stopped working on it for now. But it should not be difficult, you can save all added words in local storage or somewhere else. When the app is initializing, call spellCheckHandler.currentSpellchecker.add() for every word retrieved from local storage.

clusterberries avatar Apr 28 '17 14:04 clusterberries

@clusterberries looks like I owe you 🍻 for this simple idea

mediaslav avatar Apr 28 '17 17:04 mediaslav

I am having the same issue. On Clicking Add to Dictionary option, electron-spellchecker is throwing the following error.

ectron.asar/renderer/ap…:234 
Uncaught (in promise) Error: Could not call remote function 'replaceMisspelling'. 
Check that the function signature is correct. 

Underlying error: Error processing argument at index 0, conversion failure from undefined

Error: Could not call remote function 'replaceMisspelling'. 
Check that the function signature is correct. 

Underlying error: Error processing argument at index 0, conversion failure from undefined

Has anyone solved this issue ?? Is there any way to override the addToDictionary Method ??

rharish100193 avatar Nov 10 '17 08:11 rharish100193

A guy has written a fix for this already and it is still pending in the Pull request. As a workaround, we can use

info.selection = info.selectionText

rharish100193 avatar Nov 21 '17 01:11 rharish100193

Would be great to see this in Windows as well, Simplenote uses this in order to spell check and only OSX users can benefit from this feature.

Adding here two internal references to reach out users that have requested or asked about this: 1507139-zen , 1768586-zen

iamgabrielma avatar Feb 05 '19 10:02 iamgabrielma

Years later, and it still seems to be an issue. Is there a valid workaround for this? I tried spellCheckHandler.currentSpellchecker.add(), but it seems that spellCheckHandler.currentSpellchecker always returns null for some reason. (I found a user that had the same issue, but the solution in the threat didn't work for me.) (You know, considering a big application like Notion.so doesn't have that feature yet, it makes me think that it might not be a trivial fix.)

Of course, if it was intergated officially, it would be even better. Adding custom words is a basic feature, and it's especially weird that Mac has it and Windows doesn't.

KWaldt avatar Jan 05 '20 19:01 KWaldt

I'm very surprised that Chrome and Electron fetch a dictionary from the internet rather than using the dictionaries in the native OS. It is quite annoying to have to update dictionaries for specific applications, if they even support it. I don't see a way to switch dictionaries or add entries at all in the Electron apps I use on Linux.

ccope avatar May 12 '22 03:05 ccope