Dialog Spell Checking

All text boxes (within a form on the page) will be spell checked, unless specifically indicated to be ignored

  1. Add the RapidSpell client files to the project (per 'Installation').
  2. Drag RapidSpell-DIALOG.js from Solution Explorer into the page, this will add a <script src="RapidSpell-DIALOG.js"></script> tag to the page with the correct path.
  3. All textboxes (that are inside a FORM element, and have their id attribute set) will be checked when the user triggers the spell check eg. in a button click handler;

    <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.

Disabling spell check on specific text boxes

Modifying or removing the 'Add' option

Please see the user dictionary topic.

Setting field display labels

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.

MVC usage

Please see the MVC Usage page.

Using jQuery UI Dialog instead of a popup

In the Javascript for your page, call

rapidSpell.dialog_setUseDivDialog(true); //use false to deactivate
That will enable a DIV based dialog window, instead of a separate popup. The call to rapidSpell.dialog_setUseDivDialog checks if jQuery is currently loaded for the page (ie. your page already imports jQuery). If jQuery and/or jQuery UI is not present it will be loaded from CDN //code.jquery.com/jquery-1.11.3.min.js and //code.jquery.com/ui/1.11.4/jquery-ui.min.js. It is recommended (and to avoid using the CDN) that you please add jQuery and jQuery UI to your project and page, eg.
<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');

Modal mode

To display the spell check dialog modally, call

rapidSpell.dialog_setUseDivDialog(true); 
rapidSpell.dialog_modal = true;

User options

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.

jQuery Dialog Troubleshooting

If you get '500' server errors, please check:

We don't want you to struggle, so please email support@keyoti.com if problems persist.