<input type="button" onclick="rapidSpell.dialog_spellCheck()" value="Spell Check" /> //or for a specific text box <input type="button" onclick="rapidSpell.dialog_spellCheck(true, 'textBoxID1')" value="Spell Check" /> //or for a list of specific text boxes <input type="button" onclick="rapidSpell.dialog_spellCheck(true, ['textBoxID1', 'textBoxID2', ...])" value="Spell Check" />
Tip: If your project uses "routes.EnableFriendlyUrls(settings)" (eg in your routeconfig.cs file), then you must follow the the MVC Usage page.
rapidSpell.dialog_ignoreTextBoxIds[rapidSpell.dialog_ignoreTextBoxIds.length] = 'textBox1'; //where textBox1 is the id attribute of a textbox rapidSpell.dialog_ignoreTextBoxIds[rapidSpell.dialog_ignoreTextBoxIds.length] = '<%= textBox1.ClientID %>'; //where textBox1 is an asp:textbox tag.
Please see the user dictionary topic.
The dialog can show a label for which text field it is currently spell checking. To enable this, set the field display text (this must be done after the textboxes have been added to the DOM), eg.
var oldload = onload; onload = function () { if (typeof oldload == 'function') oldload(); rapidSpell.setParameterValue(document.getElementById('TextBox1'), 'FieldDisplayText', 'Text box 1'); rapidSpell.setParameterValue(document.getElementById('TextBox2'), 'FieldDisplayText', 'Text box 2'); rapidSpell.setParameterValue(document.getElementById('TextBox3'), 'FieldDisplayText', 'Text box 3'); }
This code uses an override of window.onload, and because of that requires that we call any existing 'onload' functions. jQuery 'ready' handlers would not require this.
Please see the MVC Usage page.
In the Javascript for your page, call
rapidSpell.dialog_setUseDivDialog(true); //use false to deactivate
<link rel="stylesheet" href="/.../jquery-ui.css" /> <script src="/.../jquery-1.11.3.min.js"></script> <script src="/.../jquery-ui.min.js"></script>
The jQuery UI Dialog mode uses an AJAX call to either WCF or ASMX based Web Service. The WCF service is used by default but this will only work with .NET 4 (project must reference Keyoti.RapidSpellWeb.ASP.NETv4.DLL). For Keyoti.RapidSpellWeb.ASP.NETv2.DLL, use the ASMX service by calling (in Javascript):
rapidSpell.setServiceType('asmx');
To display the spell check dialog modally, call
rapidSpell.dialog_setUseDivDialog(true); rapidSpell.dialog_modal = true;
There are several options available to the user via the "Options..." button in the dialog. Any changes to these options will override any settings specified in code. To disable the user options button (and any settings specified by the user), call
rapidSpell.setParameterValue('default', 'EnableOptions', false);
User options are stored in browser cookies and are not transferable to other devices as-is. Options apply to 'as you type' spell checking as well.
If you get '500' server errors, please check:
We don't want you to struggle, so please email support@keyoti.com if problems persist.