WebSpellChecker (WSC)

WSC operates in a separate browser window so your work is not obstructed. Corrected text is automatically returned to the form.

WebSpellChecker (WSC) for Textarea (Extra functionality)

Spell Check

Installation Guide

1. Specify WSC URI (See sample, line 6);

2. Define the WSC invoker:

doSpell({ctrl:sMyEditor, lang:sInitialLanguage, onClose:onCloseHandler, onCancel:onCancelHandler, onFinish:onFinishHandler}), where:
  • sMyEditor {String,mandatory} — textarea instance identifier.
  • sInitialLanguage {String, mandatory} — initial spell check language name. Now supported: en_US, en_GB, pt_BR, en_CA, fr_CA, fr_FR, de_DE, it_IT, el_GR, es_ES, da_DK, nl_NL, nb_NO, pt_PT, sv_SE, fi_FI.
  • onCloseHandler {Function,optional} — Callback function reference.
  • onCancelHandler {Function,optional} — Callback function reference.
  • onFinishHandler {Function,optional} — Callback function reference.

See sample, lines 8-16.

3. To execute a custom code after finishing, cancelling the spell check or closing the WSC window, define the callback functions:

onCloseHandler = function (mSender){}.
onCancelHandler = function (mSender){}.
onFinishHandler = function (mSender){}, where:

mSender {Mixed,optional} — Checked Element or Array of Elements (depending on contents).

(see sample, lines 12-14), and register them (see sample, line 18-20).

4. Invoke WSC when you want to check the spelling (see sample, line 28).


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
        <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
		//For Licensed version only
		<script type="text/javascript" src="[port]://[your_hostname]/spellcheck/script/ssrv.cgi?cmd=script&doc=wsc"></script>
		//For Hosted version only
		<script type="text/javascript" src="http://svc.webspellchecker.net/spellcheck/script/ssrv.cgi?cmd=script&doc=wsc&customerid=[your_long_customer_ID]"> </script>
        <script type="text/javascript">
            function startSpellCheck(){
		    		userDictionaryName: sUserDictionaryName,
                    customDictionaryName: 1,3001,
			// specify callback functions:
			onClose = function(mSender){alert("Spell checking was aborted");}
			onCancel = function(mSender){alert("Spell checking was canceled");}
			onFinish = function(mSender){alert("Spell checking was finished");}

        <textarea id="myEditor" name="myEditor" >
            This is an exampl of a sentence with two mispelled words.
        <input  type="button" value="Spell Check" onclick="startSpellCheck();" />