WebSpellChecker.net Wiki

Home : Custom Dictionary Support in Licensed WebSpellChecker

Adding Additional Dictionary to Licensed WebSpellChecker

Step 1: Purchase Industry Spell Checker from SpellChecker.net, Inc. and receive the Dictionary file(s).
Please note that Industry Spell Checker is a Customer Dictionary from the perspective of the application.

Step 2: Add a dictionary to your application.

2.1. Check whether AppServerX.xml (default location c:\Program Files\WebSpellChecker\AppServer\) contains the Customer Dictionary-related elements:

 <DSN>CustomerDb.xml</DSN>
 <CustDictSubdir>CustDict</CustDictSubdir>

Where:

  • CustDict - name of the folder where customer dictionary files are located. You will create it on Step 2.2,
  • CustomerDb.xml - name of the XML file, which lists all customer dictionaries. You will create it on Step 2.3

2.2 Create a directory for your Customer Dictionary in the root directory of Application Server (for Windows Platform the default location is c:\Program Files\WebSpellChecker\AppServer\CustDict). Put your dictionary file(s) into the Customer Dictionary directory.

2.3 Create a CustomerDb.xml file in the root directory of Application Server (for Windows Platform the default location is c:\Program Files\WebSpellChecker\AppServer\). Put the following content into this file:

<CustomerDb>
      <Dictionary DicId="1">
           <FileName>dict_file.clx</FileName>
           <Description>My Customer Dictionary #1</Description>
           <LangShortName>am</LangShortName>
      </Dictionary>
      <Dictionary DicId="3001">
           <FileName>dict_file2.clx</FileName>
           <Description>My Customer Dictionary #3001</Description>
           <LangShortName>br</LangShortName>
       </Dictionary>
</CustomerDb>

Where:

  • 1 and 3001 - dictionaries identification numbers,
  • dict_file.clx, dict_file2.clx - names of the dictionary files,
  • “My Customer Dictionary #1” and “My Customer Dictionary #3001” - Descriptions of the customers dictionaries,
  • am and br – IDs of the languages you want to enrich with the customer dictionaries. You can find the ID in AppServer.xml.

Step 3: Add an information about a dictionary to WebSpellChecker.net initialization object.
Add a “customDictionaryName” property for the WebSpellChecker initialization object (Edit .html file).

How to add WebSpellChecker custom dictionaries to WSC solution:


 doSpell({
     ctrl:"myEditor",
     lang:"en_US",
     customDictionaryName:["1","3001"]
 });

Where:

  • 1 - ID of a Custom Dictionary,
  • 3001 - ID of a Custom Dictionary.

Reload the page and test whether the words from your dictionary are marked as correct.

How to add WebSpellChecker custom dictionaries to WYSIWIG editors


  • For CKEditor 3.0+ SCAYT

Add properties to CKEditor initialization script:

    <script>
        CKEDITOR.config.scayt_customDictionaryIds = "MyDictionaryId1,MyDictionaryId2";
    </script>

CustomDictionaryID - IDs of SCAYT custom dictionaries. It's a string containing dictionary ids separated by commas (”,”)

Sample code:

<script type="text/javascript">
    // set up encrypted customer id   
    CKEDITOR.config.scayt_customerid = "encrypted_customer_id";   
    // set up dictionaries    
    CKEDITOR.config.scayt_customDictionaryIds = "1,3001";  
    // launch CKeditor  
    CKEDITOR.replace( 'editor1' );  
</script>

Detailed instructions you can find at the part “Sample” located on :

http://www.webspellchecker.net/samples/scayt-ckeditor-plugin.html

Reload the page and test whether the words from your dictionary are marked as correct.


  • For CKEditor 3.0+ WSC

Add properties to CKEditor initialization script:

<script>
	CKEDITOR.config.wsc_customDictionaryIds = "MyDictionaryId1,MyDictionaryId2";  
</script>

CustomDictionaryID - IDs of WSC custom dictionaries. It's a string containing dictionary ids separated by commas (”,”)

Sample code:

<script type="text/javascript">
    // set up encrypted customer id   
    CKEDITOR.config.wsc_customerid = "encrypted_customer_id";   
    // set up dictionaries     
    CKEDITOR.config.wsc_customDictionaryIds = "1,3001";  
    // lauch CKeditor  
    CKEDITOR.replace( 'editor1' );  
</script>

Detailed instructions you can find at the part “Sample” located on :

http://www.webspellchecker.net/samples/wsc-ckeditor-plugin.html

Reload the page and test whether the words from your dictionary are marked as correct.

  • For TinyMCE 3.3.9+ SCAYT

Add properties to TinyMCE initialization script:

tinyMCE.init({  
  scayt_custom_dic_ids: "1,3001"
  //IDs of SCAYT custom dictionaries. It's a string containing dictionary ids separated by commas (",")
});

Sample of TinyMCE initialization script you can find at the part “Sample” located on :

http://www.webspellchecker.net/samples/scayt-tinymce-plugin.html

Reload the page and test whether the words from your dictionary are marked as correct.