This guide outlines the main steps that you need to follow in order to integrate and configure the SCAYT plugin for TinyMCE 4. All the described steps are provided for the Server version of SCAYT.

1. Integrate TinyMCE 4

Before integrating and configuring the SCAYT plugin, TinyMCE 4 should be properly configured in your web application. If you haven't done it yet, please refer to Cloud Deployment of Editor & Plugins on the TinyMCE 4 documentation pages. 

2. Configure SCAYT Plugin

The next step is to add the SCAYT plugin and define the required SCAYT parameters.

  • Download SCAYT 3 plugin for TinyMCE 4. Unpack the downloaded ZIP archive with the SCAYT plugin.

  • Copy the extracted SCAYT folder to the TinyMCE 4 plugins directory. The default path to the plugins directory: tinymce4\js\tinymce\plugins\. The folder name must be “scayt”.

Edit your HTML page that contains TinyMCE as shown below.

  • Register the SCAYT plugin and add it to the TinyMCE toolbar:
<script src="/tinymce/js/tinymce/tinymce.min.js"></script>
    <script>
        tinymce.init({
            selector: "textarea#myEditor",
            theme: "modern",
            language: "en",
            plugins: [ "scayt link image table contextmenu" ],
            toolbar: "scayt undo redo | bold italic | alignleft" +
                      "aligncenter alignright alignjustify |" +
                      "bullist numlist | link image",
  • Specify path to the SCAYT plugin (wscbundle.js) using scayt_srcUrl parameter. 
scayt_srcUrl:"http(s)://your_host_name/spellcheck/wscbundle/wscbundle.js",          
  • Specify the SCAYT settings as follows:
/* SCAYT Parameters */
             scayt_autoStartup: true,
             scayt_moreSuggestions:"on",
             scayt_contextCommands:"add,ignore",
             scayt_contextMenuItemsOrder: "control,moresuggest,suggest",
             scayt_maxSuggestions: 6,
             scayt_minWordLength: 4,
             scayt_slang: "en_US",
             scayt_uiTabs: "1,1,1",
             scayt_context_mode: "default",
             scayt_elementsToIgnore: "del,pre",
 
              class_filter : function(cls, rule) {
                return cls == 'scayt-ignore' ? false : cls;
            }
        })
	</script>

 Click here to see a full list of SCAYT API parameters and possible values...

Here you can find a list of all available SCAYT parameters for TinyMCE 4.0+ that can be used for the SCAYT configuration.

 Click here to explore a full list of parameters...

scayt_customerId

Description:

scayt_customerId parameter sets a customer ID for Cloud SCAYT. 

scayt_customerId is intended for use only with the Cloud version of SCAYT.

Parameter type:String
Default value:

None

Possible values:

encrypted-customer-id

Example:

scayt_customerId = 'encrypted-customer-id';

Back to the top...


scayt_serviceProtocol

Description:

scayt_serviceProtocol parameter specifies a protocol to access the SCAYT service. If this parameter is not specified, the protocol will be automatically defined based on the script location.

Parameter type:String
Default value:

https

Possible values:
  • http
  • https

Example:

scayt_serviceProtocol='https';

Back to the top...


scayt_serviceHost

Description:

scayt_serviceHost parameter specifies a service host name to access the SCAYT service. If this parameter is not specified clearly, the service host will be automatically defined based on the script location.

Parameter type:String
Default value:

svc.webspellchecker.net

Possible values:
  • svc.webspellchecker.net  The default WebSpellChecker service host name. It is used for the WebSpellChecker Cloud services subscriptions.
  • your_host_name

Example:

scayt_serviceHost='your_host_name';

Back to the top...


scayt_servicePort

Description:

scayt_servicePort parameter specifies a service port that will be used to access the SCAYT service. 

Parameter type:String
Default value:

80

Possible values:Any available port.

Example:

scayt_servicePort ='2330';

Back to the top...


scayt_servicePath

Description:

scayt_servicePath parameter specifies a path that will be used to access the SCAYT service. 

Parameter type:String
Default value:

/spellcheck31/script/ssrv.fcgi

Possible values:Path to the ssrv.fcgi script.

Example:

scayt_servicePath ='spellcheck31/script/ssrv.fcgi';

Back to the top...


scayt_srcUrl

Description:

scayt_srcUrl parameter specifies a URL to the SCAYT core.

scayt_srcUrl is intended for use only with the Server version of SCAYT.

Parameter type:String
Default value:

http://svc.webspellchecker.net/spellcheck31/lf/scayt3/tinymce/tinymcescayt.js

Possible values:TBD

Example:

scayt_srcUrl ='http(s)://your_host_name/spellcheck31/lf/scayt3/tinymce/tinymcescayt.js"';

Back to the top...


scayt_autoStartup

Description:

scayt_autoStartup parameter turns SCAYT on/off automatically after the editor loading.

Parameter type:Boolean
Default value:

false

Possible values:
  • true
  • false

Example:

scayt_autoStartup = true;

Back to the top...


scayt_sLang

Description:

scayt_sLang parameter sets a language short code of the default language that will be used for spell checking. 

Parameter type:String
Default value:

en_US (American English)

Possible values:

Example: 

//Set the default language to German (de_DE).
scayt_sLang = 'de_DE'

Back to the top...


scayt_maxSuggestions

Description:scayt_maxSuggestions parameter defines the number of SCAYT suggestions to show in the main context menu.
Parameter type:Number
Default value:

3

Possible values:
  • 0 (zero) – No suggestions are shown in the main context menu. All suggestions will be shown in the “More Suggestions” sub-menu.
  • positive number – The max number of suggestions to show in the main context menu. Other entries will be listed in “More Suggestions”.
  • negative number 

Example:

scayt_maxSuggestions = 3;

Back to the top...


scayt_moreSuggestions

Description:

scayt_moreSuggestions parameter enables/disables the “More Suggestions” sub-menu in the context menu. 

Parameter type:String
Default value:

on

Possible values:on, off

Example: 

scayt_moreSuggestions = 'off';

Back to the top...


scayt_minWordLength

Description:scayt_minWordLength parameter defines the minimum length of the words that will be collected from editor's text for spell checking.
Parameter type:Number
Default value:

3

Possible values:

any positive number

Example:

scayt_minWordLength = 2;

Back to the top...


scayt_contextCommands

Description:

scayt_contextCommands parameter manages and customizes the SCAYT context menu commands: Add Word,  Ignore All, Options, Languages, Dictionaries and About. It is allowed to pass more than one value separating each value with a vertical bar.

Options, Languages and Dictionaries items can be added to the SCAYT context menu only if these items are present on the SCAYT settings dialog. The visibility of these items are regulated by the scayt_uiTabs parameter.

Parameter type:Array
Default value:

ignore|ignoreall|add

Possible values:
  • ignoreall|add|option|language|dictionary|about – Show in the SCAYT context menu Ignore All, Add Word, Options, Languages, Dictionaries and About options.
  • off – Do not show any additional commands in the context menu except a list of main suggestions and the More Suggestions sub-menu.
  • all – Enable all available commands in the context menu.
  • ignoreall – Add the Ignore All command to the context menu.
  • add – Add only the Add Word command to the context menu.
  • option – Add the Options item to the context menu.
  • language – Add the Languages item to the context menu. It opens the Languages tab of the SCAYT settings dialog. The Languages contains the list of the available languages for spell checking and is used for setting the default spell checking language.
  • dictionary – Add the Dictionaries item to the context menu. It opens the Dictionary tab of the SCAYT settings dialog. The Dictionaries tab is used for the personal user dictionary management. It allows users to create personal dictionaries with custom words (complex words, acronyms, proper names etc.) and use them while working with the system.
  • about – Enable the About menu item.

Example: 

//Show only the Add Word and Ignore All commands in the context menu.
scayt_contextCommands = 'add|ignoreall';

Back to the top...


scayt_contextMenuItemsOrder

Description:

scayt_contextMenuItemsOrder parameter defines the order of SCAYT context menu items by groups. This must be a string with one or more of the following words separated by a pipe character ('|').

Parameter type:String
Default value:

suggest|moresuggest|control

Possible values:
  • suggest – main suggestion word list; 
  • moresuggest – more suggestions word list; 
  • control – SCAYT commands, such as “Ignore” and “Add Word”. 

Example:

scayt_contextMenuItemsOrder = 'moresuggest|control|suggest';

Back to the top...


scayt_uiTabs

Description:

scayt_uiTabs parameter customizes the SCAYT settings dialog and manages visibility of particular tabs there such as Options, Languages, and Dictionaries. 

By default the SCAYT settings dialog contains four tabs: Options, Languages, Dictionaries and About. The About tab is used to provide the information about the SCAYT version and copyrights. Unlike Options, Languages, Dictionaries, it can't be removed.

Parameter type:Array
Default value:

1,1,1

Possible values:
  • 0,0,0 – Hide all customizable tabs: Options, Languages, and Dictionaries.
  • 0,1,0 – Hide the Options and Dictionaries tabs.
  • 0,0,1 – Hide the Options and Languages tabs.
  • 1,1,0 – Hide the Dictionaries tab.
  • 1,0,1 Hide the Language tab.
  • 1,1,1 – Show all tabs: Options, Languages, and Dictionaries.

Example:

//Hide the Languages tab.
scayt_uiTabs = '1,0,1';

Back to the top...


scayt_customDictionaryIds

Description:

scayt_customDictionaryIds parameter specifies a custom dictionary ID that will be linked with SCAYT.

scayt_customDictionaryIds parameters is intended for use only with the Server version of SCAYT.

Parameter type:String 
Default value:

None

Possible values:IDs of custom dictionaries.

Example:

scayt_customDictionaryIds='3021,3456,3478';

Back to the top...


scayt_userDictionaryName

Description:

scayt_userDictionaryName parameter predefines a specific user dictionary that will be used with SCAYT.

Parameter type:String
Default value:

None

Possible values:Any name of a user dictionary.

Example:

scayt_userDictionaryName='user_dictionary_name';

Back to the top...


scayt_elementsToIgnore

Description:

scayt_elementsToIgnore parameter defines HTML tags that will be ignored during check spelling.

Parameter type:String
Default value:

'style'

Possible values:Any HTML tag

Example:

scayt_elementsToIgnore='del,pre'';

Back to the top...


Check a demo page with SCAYT plugin for TinyMCE on our website.


Still Have a Question?

Please feel free to contact our technical team if you are having any difficulties with configuration.


Can be also useful: