Instead of using a dialog to display the spell checking result and options,
EO.Web SpellChecker can highlight the spell errors and displays a context
menu with options when user clicks the highlighted errors.
Following these simple steps to use the spell checker this way:
- Drag a SpellChecker and a ContextMenu control from the toolbox to your Web Form;
- Right click the ContextMenu control, then select Edit Menu... to
initializes the menu from a built-in template. You can also use your own
design. There is no need to create any menu items in the context menu. The
spell checker will create the menu items.
-
This step is optional. Modify the SpellChecker's
IgnoreOnceMenuItemText,
IgnoreAllMenuItemText,
AddCustomMenuItemText,
EndCheckerMenuItemText and
NoSuggestionMenuItemText
if you wish to change the default menu item text;
-
This step is optional. Modify the SpellChecker's
MaxSuggestions property;
-
Set the SpellChecker's
ContextMenuID to the ID
of the context menu control;
-
Set the SpellChecker's ControlToCheck
property to indicate the control whose text is to be checked. Note ControlToCheck
must points to a control or element with static HTML instead of an editable textbox.
For example, a textarea element does not work with this option because its content
is not static HTML;
-
Either set the SpellChecker's StartButton
so that clicking the button can start the spell checker, or add code that calls
the SpellChecker's start method
on the client side to initiate the spell check;
-
Run the page and start the spell check. If there are no errors, a "no error" message
is displayed; otherwise the errors are highlighted. Click any of the highlighted area
to display the context menu, which is automatically filled to include Ignore Once,
Ignore All, Add to Dictionary, list of suggestions and Stop.