Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):
<script>
    window.SCAYT_CONFIG = {
        spellcheckLang: 'en_US',
 	    serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        customerId: 'customerId_value'
    };
</script>
 
<div contenteditable id="container1" data-scayt-autocreate="true">
    This is an exampl of a sentence with two mispelled words.
    Just type text with misspelling to see how it works.
</div>

3.2. Contenteditable IFRAME Element

Warning
titleSCAYT 2:
<iframe sc_dojoType="scayt.ui" src="editable_doc.html">


Code Block
languagejs
themeEmacs
titleSCAYT 3 (Imperative Notation):
<iframe id="container2" src="editable_doc.html"></iframe>
 
<script>
    var iframeInstance;
    var iframeElement = document.getElementById("container2");
 
    SCAYT.SCAYT.createScaytControl(iframeElement, {
            container: document.getElementById("container1"),
            autoStartup: true,
            spellcheckLang: 'en_US',
            serviceProtocol: 'https',
            serviceHost: 'svc.webspellchecker.net',
            servicePort: '443',
            servicePath: 'spellcheck31/script/ssrv.cgi',
            customerId: 'customerId_value'
        },
        function(instance) {
            iframeInstance = instance;
        }
    );
</script>

...

Code Block
languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):
<script>
    <script>
    window.SCAYT_CONFIG = {
        spellcheckLang: 'en_US',
 	    serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',       
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        customerId: 'customerId_value'
    };
</script>
 
<iframe id="container2" data-scayt-autocreate="true" src="editable_doc.html"></iframe>
 
 
/*Editable_doc.html example: */
 
<html>
	<head>
		<title>SCAYT for Editable Controls</title>
      </head>
      <body contenteditable>This is an exampl of a sentence with two mispelled words. Just type text with misspelling to see how it works.
      </body>
</html>

3.3. Contenteditable INPUT Element

Code Blockwarning
titleSCAYT 2:
languagejs
themeEmacs
<input idname="container3scayt_input" typesize="text50" value="This is sc_dojoType="scayt.Input" lang="<language_short_code>" value="This is an exampl of a sentence with two mispelled words.">


Code Block
languagejs
themeEmacs
titleSCAYT 3 (Imperative Notation):
<input id="container3" type="text" value="This is an exampl of a sentence with two mispelled words.">
 
<script>
    var instance3 = new SCAYT.SCAYT
 
<script>
    var instance3 = new SCAYT.SCAYT({
        container: document.getElementById("container3"),
        autoStartup: true,
        spellcheckLang: 'en_US',
        serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        customerId: 'customerId_value'
    });
</script>

...

Code Block
languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):
<script>
    window.SCAYT_CONFIG = {
        spellcheckLang: 'en_US',
 	    serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',       
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        customerId: 'customerId_value'
    };
</script>
 
<input id="container3" data-scayt-autocreate="true" type="text" value="<input id="container3" data-scayt-autocreate="true" type="text" value="This is an exampl of a sentence with two mispelled words.">

3.4. Contenteditable TEXTAREA Element

Warning
titleSCAYT 2:
<textarea name="scayt_textarea" sc_dojoType="scayt.Textarea" scaytConfig.customDictionaryIds = [1,3001]; lang="<language_short_code>" cols="40" rows="7">
This is an exampl of a sentence with two mispelled words.">

...


</textarea>


Code Block
languagejs
themeEmacs
titleSCAYT 3 (Imperative Notation):
<textarea id="container4">
    This is an exampl of a sentence with two mispelled words.
</textarea>
 
<script>
    var instance4 = new SCAYT.SCAYT({
        container: document.getElementById("container4"),
        autoStartup: true,
        spellcheckLang: 'en_US',
        serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        customerId: 'customerId_value'
    });
</script>

...

Code Block
languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):
<script>
    window.SCAYT_CONFIG = {
        spellcheckLang: 'en_US',
 	    serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',       
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        customerId: 'customerId_value'
    };
</script>
 
<textarea data-scayt-autocreate="true" id="container4">
    This is an exampl of a sentence with two mispelled words.
</textarea>

...