SpellCheckAsYouType (SCAYT)

Info

SCAYT 3 for Editable Controls is a standalone control that is used for spell checking of single-line or multiline HTML elements and can be integrated with such editable controls as textarea and input, div and iframe.

Currently the β-version of SCAYT 3 for Editable Controls is available for textarea and input. Extended support of the div and iframe controls is scheduled for the Release Candidate (RC) version.

SpellCheckAsYouType (SCAYT) 3 for Editable Controls

SpellCheckAsYouType (SCAYT)

SCAYT 3 for Editable Controls is a standalone control that is used for spell checking of single-line or multiline HTML elements and can be integrated with such editable controls as textarea and input, tags with a contenteditable attribute (div and etc.), and iframe.

Beta version of SCAYT 3 for Editable Controls is available for textarea and input. Extended support of the rest controls is scheduled for the Release Candidate version (Q4 2016).

Beta version of SCAYT 3 for Editable Controls introduces the following major updates:

  • Supported controls: Textarea and Input
  • Extended and documented API
  • Supported browsers: Chrome (the latest), Firefox (the latest), Internet Explorer 11+
  • Also compatible with browsers: Internet Explorer 8+, Safari (the latest)
  • Implemented support for Drag and Drop, Undo and Redo commands
  • Added possibility to use keyboard Shortcuts

SCAYT 3 for EC has been developed based on the SpellCheckAsYouType product and includes all of that product’s features.

As it does not affect the functionality of your application or website, one of the most popular ways of using SCAYT 3 for Editable Control is integrating it with any system where spelling check functionality is required, e.g. website forms, Customer relationship management (CRM) systems, Content management systems (CMS), etc.

SCAYT created via new keyword

This is Input:
This is Textarea:

SCAYT created via data-scayt-autocreate attribute

SCAYT controls created in such way could be configured by specifying data attribute in next format:
data-scayt-optionName. E.g. data-scayt-spellcheckLang="en_US"

This is Input:
This is Textarea:

Sample

									<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
									<html xmlns="http://www.w3.org/1999/xhtml">
									<head>
										<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />;
										<title<SCAYT Text Box for forms</title>
										//Setup path to SCAYT Hosted loader
										<script type="text/javascript" src="http://svc.webspellchecker.net/spellcheck31/lf/scayt3/scayt/scayt.js"></script>
										//Setup path to SCAYT Licensed loader
										<script type="text/javascript" src="<spellcheck-host>/spellcheck/lf/scayt3/scayt/scayt.js"></script>
									</head>
									<body>
									<table align="center">
										 <tr align="left">
										 <td><b>This is Input:</b></td>
										 <td><input style="width:450px" id="input" type="text" size="80" value="This is an exampl of a sentence with two mispelled words."></td>
										 </tr>
										 <tr align="left">
										 <td valign="top"><b>This is Textarea:</b></td>
										 <td><textarea style="width:450px" id="textarea" cols="80" rows="10">This is an exampl of a sentence with two mispelled words. Just type text with to see how it works.</textarea></td>
										 </tr>
										 </table>
										 <h3>SCAYT created via <i>data-scayt-autocreate</i> attribute</h3>
										 <p>SCAYT controls created in such way could be configured by specifying data attribute in next format:</br> <strong>data-scayt-<i>optionName</i></strong>. E.g. data-scayt-spellcheckLang="en_US"</p>
										 <table align="center">
										 <tr align="left">
										 <td><b>This is Input:</b></td>
										 <td><input style="width:450px" data-scayt-customerId="encrypted-customer-id" data-scayt-autocreate data-scayt-spellcheckLang="de_DE" type="text" size="80" value="Dies ist ein Beispiel eiines Satzes mit zwei falsch geschriebene Wörter."></td>
										 </tr>
										 <tr align="left">
										 <td valign="top"><b>This is Textarea:</b></td>
										 <td><textarea style="width:450px" data-scayt-customerId="encrypted-customer-id" data-scayt-autocreate data-scayt-spellcheckLang="it_IT" cols="80" rows="10">Questo è un esempo di una frase con due parole errate. Basta digitare il testo con errore ortografico per vedere come funziona.</textarea></td>
										 </tr>
									</table>
									<script>

										 var input = document.getElementById('input');
										 var textarea = document.getElementById('textarea');


										 var inputSCAYT = new SCAYT.SCAYT({
										 //DOM node with text or its selector.
										 container: input,
										 //The parameter allows to specify protocol for WSC service (entry point is ssrv.cgi) full path.
										 serviceProtocol: "http",
										 //The parameter allows to specify host for WSC service (entry point is ssrv.cgi) full path.
										 serviceHost: "svc.webspellchecker.net",
										 //The parameter allows to specify default port for WSC service (entry point is ssrv.cgi) full path.
										 servicePort: "80",
										 //The parameter allows to specify path for WSC service (entry point is ssrv.cgi) full path.
										 servicePath: "spellcheck31/script/ssrv.cgi",
										 //The parameter allows to specify user defined menu items with custom behavior. 
										 additionalMenuItems: {
											"customItem1": {
												 itemTitle: "Custom item in clipboard section",
												 order: 0,
												 group: "clipboard",
												 extraClass: "some-class-1",
												 onClick: function() {
												 	alert("Thank you! Context menu will be closed");
												 	return false;
											 	}
										 	}
										 },
										 //The parameter sets a shortcuts list. It is an array containing objects with a shortcut and callback function.
										 shortcutsList: [
                    						{
                        				 		shortcut: SCAYT.CTRL + 66,
                       					 		callback: function() {
                            			 		alert("ctrl+B from user");
                        						}
                    						}
                						],
                						 //The parameter sets length of the Undo array.
                						 undoDataSize: 10,
										 //The parameter allows to specify a desired theme for UI.
										 theme: "classic",
										 //The parameter defines minimum length of the letters that will be collected from 
										 // container's text for spell checking. Possible value is any positive number.
										 minWordLength: 4,
										 //The parameter sets localization. If no parameter is specified by a user, 
										 //it will be detected automatically from a browser settings. 
										 //If the parameter can't be automatically detected, a default value will be used.	 
										 localization: "en",
										 //The parameter specifies the names of tags which will be skipped while spell checking. 
										 //It is a string containing tag names separated by commas (","). 
										 //Please note that the "style" and "script" tags will be added to a specified tag list.
										 elementsToIgnore: "style|script",
										 //The parameter activates a User Dictionary in SCAYT.
										 userDictionaryName: "MyUserDictionaryName",
										 //The parameter links SCAYT to custom dictionaries. 
										 //Here is a string containing dictionary IDs separated by commas (",").
										 customDictionaryIds: "ID1, ID2",
										 //The parameter sets the customer ID for SCAYT. 
										 //It used for a migration from free, ad-supported version to paid, ad-free version.
										 customerId: "encrypted-customer-id",
										 // The parameter turns on/off SCAYT on the autostartup. 
										 //If "true", turns on SCAYT automatically after loading the SCAYT application.	 
										 autoStartup: true,
										 //The parameter defines the existence and the order of menu items inside of their sections. 
										 //E.g. if you remove the "Control" section, then all its items (Ignore, Ignore All, Add Word) 
										 //will not be included to the view. Please note that the "About" menu item 
										 //and its tab aren’t allowed to be removed by default. 
										 ///Such a customization can be provided for an additional fee and for more details, 
										 //please contact support@webspellchecker.										 
										 contextMenuSections: 
										  'undoredo|suggest|moresuggest|control|clipboard|options',
										 //The parameter defines existance and order of menu items inside of their sections.
										 contextMenuCommands: 
										  'undo|redo|ignore|ignoreall|addword|paste|cut|copy|options|languages|dictionaries|togglescayt|help|customItem1',										 
										 //The parameter defines the number of SCAYT suggestions to show in the context menu. 
										 //Possible values are: "0" (zero) – No suggestions are shown in the context menu. 
										 //All suggestions will be listed in the "More Suggestions" sub-menu. 
										 //Positive number – The maximum number of suggestions to show in the context menu. 
										 //Other suggestions will be shown in the "More Suggestions" sub-menu. 
										 //Negative number – 5 suggestions are shown in the context menu. 
										 //All other suggestions will be listed in the "More Suggestions" sub-menu.
										 suggestionsCount: 3,
										 //The parameter enables/disables the "More Suggestions" sub-menu in the context menu. 
										 //Possible values are: "0" (zero) – No suggestions are shown in the "More Suggestions" sub-menu. 
										 //Positive number – The maximum number of suggestions to show in "More Suggestions" sub-menu. 
										 //Negative number – 10 suggestions are shown in "More Suggestions" sub-menu.
										 moreSuggestionsCount: 4,
										 //The parameter sets the default spell checking language for SCAYT.  Possible values are:
										 // 'en_US', 'en_GB', 'pt_BR', 'da_DK', 'nl_NL', 'en_CA', 'fi_FI', 'fr_FR', 'fr_CA',
										 // 'de_DE', 'el_GR', 'it_IT', 'nb_NO', 'pt_PT', 'es_ES', 'sv_SE'.
										 spellcheckLang: "en_US",
										 //The parameter customizes the SCAYT dialog to show particular tabs. 
										 //Please note that the "About" menu item and its tab aren’t allowed to be removed by default. 
										 //Such a customization can be provided for an additional fee and for more details, please contact support@webspellchecker.
										 uiTabs: 'options,languages,dictionaries,about',
										 //This is the SCAYT onLoad callback.
										 onLoad: function() {
        									// "this" refers to SCAYT instance
        									this.setDisabled(true);
    										}										 
										 });


										 var textareaSCAYT = new SCAYT.SCAYT({
										 serviceProtocol: "http",
										 serviceHost: "svc.webspellchecker.net",
										 servicePort: "80",
										 servicePath: "spellcheck31/script/ssrv.cgi",
										 additionalMenuItems: {
											"customItem1": {
												 itemTitle: "Custom item in clipboard section",
												 order: 0,
												 group: "clipboard",
												 extraClass: "some-class-1",
												 onClick: function() {
												 	alert("Thank you! Context menu will be closed");
												 	return false;
											 	}
										 	}
										 },
										 shortcutsList: [
                    						{
                        						shortcut: SCAYT.CTRL + 66,
                       							callback: function() {
                            					alert("ctrl+B from user");
                        						}
                    						}
                						 ],
                						 undoDataSize: 10,
										 theme: "classic",
										 minWordLength: 4,
										 localization: "en",
										 elementsToIgnore: "style|script",
										 userDictionaryName: "MyUserDictionaryName",
										 customDictionaryIds: "ID1, ID2",
										 customerId: "encrypted-customer-id",
										 autoStartup: true,
										 contextMenuSections: 'undoredo|suggest|moresuggest|control|clipboard|options',
										 contextMenuCommands: 'undo|redo|ignore|ignoreall|addword|paste|cut|copy|options|languages|dictionaries|about|togglescayt|help|customItem1',
										 uiTabs: 'options,languages,dictionaries,about',
										 suggestionsCount: 3,
										 moreSuggestionsCount: 4,
										 spellcheckLang: "en_US",
										 container: textarea,
										 onLoad: function() {
        									// "this" refers to SCAYT instance
        									this.setDisabled(true);
    										}						 
										 });
									</script>
									</body>
									</html>

									
--> -->