$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
HtmlEditor Spellchecker in ASP.NET
Home > How to > HtmlEditor Spellchecker

Information to Html Editor Spell Checker

Similar to those commonly used word processing applications, the PerHtmlEditor control also allows developers to add spell checking function to the html editor in aspx web page. From this online tutorial, you will get information on how to enable spell checking function in ASP.NET web page and how to add new dictionary to html editor control using ASP.NET AJAX.

How to Enable the Spell Checking Function

In this section, we will offer detailed guidance on how to activate the spell checking functionality in your ASP.NET web application.
  1. To be first, you need to create a folder called PerSpell in the App_Data folder of your web project and then you just copy target dictionary files (those tdf files) in that PerSpell folder.
  2. Second, open the web.config file, find the section of httpHandlers and add the SpellCheck handler.
  3. The last step is to declare the language property in the PerHtmlEditor declaration.
In the following sample code, we will guide you how to add the speck checking tool to the toolbar of the html editor in aspx web page or using C#.NET code.


<kettic:radeditor id="PerHtmlEditor1" runat="server" skin="Default">    
< kettic:EditorToolGroup>
< kettic:EditorTool Name="AjaxSpellCheck" Text="Spell Checker" />
</ kettic:EditorToolGroup>
</ kettic:radeditor>

C# Code

EditorToolGroup group1 = new EditorToolGroup();
EditorTool checker = new EditorTool("AjaxSpellCheck");
Note: right now, the spell checking function is only applicable to English language. But there will be more supported languages in the upcoming versions of the PerHtmlEditor Control for ASP.NET AJAX.

How to Add New Dictionary

As is mentioned in above guidance, the dictionary files that will be added to the PerHtmlEditor control are in .tdf files. So before showing you how to add custom dictionary to the html editor control, we will briefly introduce the .tdf file format. TDF file, short for Trusted Data Format, is a file type that is developed from XML file. This file has level tagging and security features.
Following steps are used to create a custom TDF dictionary.
  1. You can download the dictionary (.dic) from some websites, or you can create a text file(.txt) which is in the word-per-line format.
  2. Please save the text file with Unicode encoding method.
  3. Rename the dictionary file type to .tdf.
  4. Now you can place the dictionary file in the PerSpell folder of the App_Data folder. And run the application following the steps that are listed in the second part of this article.