Open snene opened 6 years ago
It's likely you are inadvertently creating a context menu somewhere else. For example when using Chrome developer tools I have an inspect element option on the first click, and have to click again to get the normal context menu.
@snene @Slapbox Do you think it's possible to add these spelling mistake corrections to the initial context menu (first click) ?
@WilliamHolmes Yes, the solution is to not display your application's context menu when the spell checker is supposed to display its for a misspelled word. e.g. for your context menu add a check like following
// Build right-click context menu when webview's ready
require('electron-context-menu')({
window: webview,
// If spell checker context menu is going to be displayed don't show ours
shouldShowMenu: (event, params) => !(params.isEditable && params.misspelledWord && params.misspelledWord.length),
Thanks @snene i’ll try that. Im still trying to figure out how to change the electron browser context menu (copy, paste, etc.) language as that is where the spelling corrections are placed.
@snene @Slapbox
Any ideas how to change that electron browser context menu to another language?
Unfortunately no. Have you downloaded the source code and searched for the string "Search with Google" ?
That's where I'd start. If you find out how to do this, please be sure to come back and update us!
Thanks for he reply. I’ve opened a issue/question to the wider community for some feed back. https://github.com/electron-userland/electron-spellchecker/issues/114
electron: 1.7.8 electron-spellchecker: 1.1.2
Thanks for the example provided, I got spell checker to work in my application inside the webview. It detects the wrongly spelled words and marks them. But when I right click on the wrong word, I don't see the menu entries for the spell checker. But when I right click the second time, I see them.
I am also using electron-context-menu to add other context menu entries.
I am wondering why do I need to click twice to get the spell checker menu entries. Any pointers? Thanks a lot!