<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" />
<script type='text/javascript'> rapidSpell.dialog_popupURL ="<%=request.getContextPath()%>/a.rapidspellweb?t=d"; </script>
<script type='text/javascript'> rapidSpell.setParameterValue('default', 'AssumedApplicationEncoding', '8859_1'); </script>
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.id %>'; //where textBox1 is an object.
Please see the user dictionary topic.
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.
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 the "a.rapidspellweb" Servlet.
To display the spell check dialog modally, call
rapidSpell.dialog_setUseDivDialog(true); rapidSpell.setServiceType('servlet'); 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.