|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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.aspxYou would need to pass the spell checker related special command IDs to this method: https://www.essentialobjects.com/doc/eo.webbrowser.commandidsfields.aspxFor example, to auto-correct using the first suggestion, you would do:
Code: C#
webView.ExecCommand(CommandIds.SpellCheckSuggestion0);
Hope this helps. Thanks!
|
|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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!
|
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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.aspxYou can find more information about browser engine options here: https://www.essentialobjects.com/doc/webbrowser/advanced/engine.aspxThanks!
|
|