When using spell checking in our online editor, dictionaries that are located in the Dictionaries folder of the synchronization service are loaded automatically. That includes all OpenOffice dictionaries and user dictionaries.

This article explains how to enable spell checking for the HTML5-based online editor:

Web.TextControl and Spell Checking

A very common task is to load user specific user dictionaries for each individual user. Therefore, the JavaScript API provides methods to load and save user dictionaries locally. In order to load dictionaries from the server, you will need to retrieve the dictionary from the server and load it into the editor.

In this sample, we created a Web API to handle user dictionaries:

Loading...

The Web API contains 3 endpoints:

  • UserDictionaryFilenames
    This endpoint returns all user dictionary filenames in the created folder Dictionaries.
  • LoadUserDictionary
    This endpoint loads a specific dictionary by filename.
  • SaveUserDictionary
    This endpoint saves a specific dictionary.

On loading the page, all available dictionaries are listed in a drop-down box:

Loading...

If a dictionary is selected and the button Load UserDictionary is clicked, the selected dictionary is loaded asynchronously using JavaScript:

Loading...

If the button Save UserDictionaries is clicked, all dictionaries are saved back on the server:

Loading...

The following animation shows this sample in action:

Loading user dictionaries

This this on your own and download the sample from our GitHub repository.

GitHub

Download and Fork This Sample on GitHub

We proudly host our sample code on github.com/TextControl.

Please fork and contribute.

Requirements for This Sample

  • Visual Studio 2017 or better
  • TX Text Control .NET Server for ASP.NET (trial sufficient)