Global

Members

(constant) SCAYT_BASEPATH :string

Path to the scayt.js script. Use before creation of a SCAYT instance.

Type:
  • string
Example
window.SCAYT_BASEPATH = 'apps/scayt/';

(constant) SCAYT_CONFIG :Object

Represents default SCAYT for Textboxes configuration for a static control creation.
Use before creation of a SCAYT instance.

Type:
  • Object
Properties:
Name Type Attributes Default Description
serviceProtocol string <optional>
'http'

The parameter allows to specify protocol for WSC service (entry point is ssrv.cgi) full path.

serviceHost string <optional>
'svc.webspellchecker.net'

The parameter allows to specify host for WSC service (entry point is ssrv.cgi) full path.

servicePath string <optional>
'spellcheck31/script/ssrv.cgi'

The parameter allows to specify path for WSC service (entry point is ssrv.cgi) full path.

servicePort number <optional>
'80'

The parameter allows to specify default port for WSC service (entry point is ssrv.cgi) full path.

customerId string <optional>
'1:j47ai-r4SLN1-dG5xP1-UuonU-WqXUZ3-0bzqZ1-QI8OP1-bQZcb1-KQuPE3-nWbcY3-aA4Zk4-wT9'

The parameter sets the customer ID for SCAYT. It used for a migration from free, ad-supported version to paid, ad-free version.

Example
<script>
    window.SCAYT_CONFIG = {
        serviceProtocol: 'http',
        serviceHost: 'svc.webspellchecker.net',
        servicePath: 'spellcheck31/script/ssrv.cgi',
        servicePort: '80',
        enableGrayt: true,
        customerId: '1:j47ai-r4SLN1-dG5xP1-UuonU-WqXUZ3-0bzqZ1-QI8OP1-bQZcb1-KQuPE3-nWbcY3-aA4Zk4-wT9'
    };
</script>
<input data-scayt-autocreate="true" type="text" value="">

Methods

scaytAlreadyLoaded()

The function that runs when SCAYT is already loaded.

Example
// Asynchronous SCAYT loading
<script async src="path/to/scayt.js"></script>

// Define the function 'scaytAlreadyLoaded' which will be launched right after SCAYT is fully loaded.
function scaytAlreadyLoaded() {
    // SCAYT is available to be launched
    var instance = new SCAYT.SCAYT({
        container: document.getElementById('elementId'),
        autoStartup: true,
        serviceProtocol: 'http',
        servicePort: '80',
        serviceHost: document.location.host,
        servicePath: 'spellcheck/script/ssrv.cgi'
    });
}