Versions Compared

Key

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

...

Excerpt Include
IN:_include_cloud_scayt_src_url
IN:_include_cloud_scayt_src_url
nopaneltrue

2. Update SCAYT initialization in controls. Depending on the type of the controls (HTML elements) where the SCAYT functionality is embedded and used, please update your configuration as follows. 

...

Warning
titleSCAYT 2:
<div contenteditable sc_dojoType="scayt.ui"> 
This is an exampl of a sentence with two mispelled words. Just type text with misspelling to see how it works.
</div>
Code Block
languagejs
themeEmacs
titleSCAYT 3 (Imperative Notation):
<div contenteditable id="container1">
    This is an exampl of a sentence with two mispelled words.
    Just type text with misspelling to see how it works.
</div>
 
<script>
    var instance1 = new SCAYT.SCAYT({
        container: document.getElementById("container1"),
        autoStartup: true,
        spellcheckLang: 'en_US',
        serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',
 	    servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
	 customerId: 'encrypted-customer-ID'
    });
</script>

...

languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):

...

Excerpt Include
IN:_include_cloud_scayt_div
IN:_include_cloud_scayt_div
nopaneltrue

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: 'encrypted-customer-ID'
        },
        function(instance) {
            iframeInstance = instance;
        }
    );
</script>

...

languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):

...

Excerpt Include
IN:_include_cloud_scayt_iframe
IN:_include_cloud_scayt_iframe
nopaneltrue

3.3. Contenteditable INPUT Element

Warning
titleSCAYT 2:
<input name="scayt_input" size="50" 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({
        container: document.getElementById("container3"),
        autoStartup: true,
        spellcheckLang: 'en_US',
        serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        customerId: 'encrypted-customer-ID'
    });
</script>

...

languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):

Excerpt Include
IN:_include_cloud_scayt_input
IN:_include_cloud_scayt_input
nopaneltrue

...

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: 'encrypted-customer-ID'
    });
</script>

...

languagejs
themeEmacs
titleSCAYT 3 (Declarative Notation):

Excerpt Include
IN:_include_cloud_scayt_textarea
IN:_include_cloud_scayt_textarea
nopaneltrue

...

You can find more information about SCAYT 3 parameters for Editable Controls here.

...