Welcome Guest Search | Active Topics | Sign In | Register

How to Add Spell Checker to custom WPF context menu Options
iTester
Posted: Sunday, August 6, 2017 9:06:27 PM
Rank: Member
Groups: Member

Joined: 5/2/2017
Posts: 25
Hello,
Your TabbedBrowser example contains the Spell Checker, which uses the AddSpellCheckSuggstions method.

Since context menu from TabbedBrowser example does not support the images in menu items, we created our own WPF context menu with images. However we can not add the AddSpellCheckSuggstions method into our own custom WPF context menu since it does not support this method.

Can you please provide any suggestions how to add the Spell Checker feature into the custom WPF context menu? Namely to present the list of suggestions and to replace the misspelled word with suggested word from within custom WPF context menu.

Thanks!
eo_support
Posted: Monday, August 7, 2017 9:38:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

You can create your own menu item and then when the menu items are clicked, you would call this method:

https://www.essentialobjects.com/doc/eo.webbrowser.webview.execcommand.aspx

You would need to pass the spell checker related special command IDs to this method:

https://www.essentialobjects.com/doc/eo.webbrowser.commandidsfields.aspx

For example, to auto-correct using the first suggestion, you would do:

Code: C#
webView.ExecCommand(CommandIds.SpellCheckSuggestion0);


Hope this helps.

Thanks!
iTester
Posted: Monday, August 7, 2017 6:46:45 PM
Rank: Member
Groups: Member

Joined: 5/2/2017
Posts: 25
Thank you for advice. Unfortunately it did not work for us. We are able to display the list of spelling choices. But when in menu we click the correctly spelled word the misspelled word is NOT replaced.
Can I upload the small test project to your web site to illustrate the problem?
eo_support
Posted: Thursday, August 10, 2017 2:08:41 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Sorry about the delay. We have confirmed that this is an issue on our end and will be resolved in our next build.

Thanks!
eo_support
Posted: Friday, August 11, 2017 6:45:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

This is just to let you know that we have posted a new build that should resolve this issue. You can download the new build from our download page.

Note that for the suggestions to work, the context menu still needs to be triggered first (BeforeContextMenu event needs to be fired). After that you can call WebView.ExecCommand to replace the current word with the suggested word.

Please let us know how it goes.

Thanks!
iTester
Posted: Wednesday, August 16, 2017 11:02:49 AM
Rank: Member
Groups: Member

Joined: 5/2/2017
Posts: 25
Thank you very much for new build! User now can replace the misspelled word with the correctly spelled word from the list.

Question. Does spell checker work only with English? We tried this method on Cyrillic-based Windows and spell checker did not work.

Can you please provide more information about the use of Spell Checker with languages other than English.

Thanks!

eo_support
Posted: Friday, August 18, 2017 4:58:22 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

You will need to pass --override-spell-check-lang option to EngineOptions.ExtraCommandLineArgs. See here for more details:

https://www.essentialobjects.com/doc/eo.webengine.engineoptions.extracommandlineargs.aspx

You can find more information about browser engine options here:

https://www.essentialobjects.com/doc/webbrowser/advanced/engine.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.