You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Initialize WebSpellChecker Proofreader functionality in <div> element using either imperative or declarative notation as it is shown in the examples below.

WebSpellChecker Proofreader (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 = WEBSPELLCHECKER.init({
        container: document.getElementById("container1"),
        autoStartup: true,
        lang: 'en_US',
        serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',
 	    servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.fcgi',
		serviceId: 'encrypted-service-ID'
    });
</script>
WebSpellChecker Proofreader (Declarative Notation):
<script>
    window.WEBSPELLCHECKER_CONFIG = {
        lang: 'en_US',
 	    serviceProtocol: 'https',
        serviceHost: 'svc.webspellchecker.net',
        servicePort: '443',
        servicePath: 'spellcheck31/script/ssrv.fcgi',
        serviceId: 'encrypted-customer-ID'
    };
</script>
 
<div contenteditable id="container1" data-wsc-autocreate="true">
    This is an exampl of a sentence with two mispelled words.
    Just type text with misspelling to see how it works.
</div>

  • No labels