Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Editor / AJAX Spell Checker

Choose tools file:
   
  
 
 
   

  • Enable RadSpell in RadEditor

    To enable spell checking in your web application you need to accomplish the following 2 tasks:

    1. Copy the needed dictionary files in your project's App_Data folder:
      The files are located in your <RadControls for ASP.NET AJAX installation folder>\App_Data\RadSpell. Create a RadSpell folder in your project's App_Data folder and copy the dictionaries there.
    2. Add the SpellCheck handler in your web.config file. This can be done by using one of the following approaches:
      1. Manually add the handler in your web.config file (in the httpHandlers section):
        <add verb="*" validate="false" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"/>
      2. Use the RadEditor's Smart Tag in Visual Studio. Note that the smart tag will appear only if you have the Telerik.Web.Design.dll file in your project's bin folder or in the GAC.
    3. Set the Language property of the RadEditor (by default it is set to "en-US"). If you want to change the language, you can do this by
      1. declaring the property in the RadEditor's declaration:
        <telerik:RadEditor runat="server" ID="RadEditor1">
        <Languages>
        <telerik:SpellCheckerLanguage Code="fr-FR" Title="French" />
        </
        Languages>
        </telerik:RadEditor>
      2. adding the language in the RadEditor's Languages collection. It is recommended to add the language in Page_Load:
        C#:
        protected void Page_Load(object sender, EventArgs e)
        {
        if (!Page.IsPostBack)
        {
        RadEditor1.Languages.Add(
        new SpellCheckerLanguage("fr-FR", "French"));
        }
        }

        VB.NET:
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        If Not Page.IsPostBack Then
        RadEditor1.Languages.Add(New SpellCheckerLanguage("fr-FR", "French"))
        End If
        End Sub

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Theme="Default" Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Editor.SpellChecker.DefaultCS" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <qsf:headtag id="Headtag1" runat="server"/>
        
    </head>
    <body class="BODY">
        <form id="form1" runat="server">
                            
            <qsf:header id="Header1" runat="server" navigationlanguage="c#"/>
            <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
            <asp:UpdatePanel id="UpdatePanel1" runat="server">
            <ContentTemplate>
            <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Enabled="true" Title="Choose tools file:"
                            Expanded="true" Style="text-align: left;" HorizontalAlign="Right" >
                    <table width="100%">
                        <tr>
                            <td valign="top" class="text">
    <asp:radiobuttonlist repeatdirection="Horizontal" cellpadding="0" cellspacing="0"
    OnSelectedIndexChanged="RadioButtonListDictionaryMode_SelectedIndexChanged"
    cssclass="text" id="RadioButtonListDictionaryMode"
    runat="server" autopostback="True">

                                    <asp:listitem value="SingleDictionary" selected="True">Single Dictionary</asp:listitem>
                                    <asp:listitem value="MultipleDictionaries">Multiple Dictionaries</asp:listitem>
                                </asp:radiobuttonlist>
                            </td>
                        </tr>
                    </table>
                </qsf:ConfiguratorPanel>
                <telerik:radeditor runat="server" ID="RadEditor1" SkinID="BasicSetOfTools" Height="400px">
                 <Content>
                    <h2 class="titleText">RadEditor for ASP.NET AJAX</h2>
                    <p style="text-align: justify;"><span style="font-size: 19px; color: #4f6128;"><strong>RadEditor</strong></span><span style="color: #4f6128;"> </span>is not simply an HTML<a href="#HTMLDescription"><sup>1</sup></a> Editor. It is what Microsoft chose to use in <strong>MSDN</strong>, <strong>CodePlex</strong>, <strong>TechNet</strong>, <strong>MCMS</strong> and even as an alternative to the default editor in <a href="http://www.telerik.com/products/aspnet-ajax/sharepoint.aspx">SharePoint</a>. Whether you need a mere Textbox with Google-like spellchecker, or a Word-like content authoring environment, the result is the same: clean <strong>XHTML</strong> output, fast rendering, widest cross-browser support, and <a href="http://www.telerik.com/products/aspnet-ajax/editor.aspx">tons of features</a>: <br />
                    <br />
                    <img src="../../Img/editor.jpg" alt="product logo" style="margin-top: 25px; float: left; margin-right: 15px;" /></p>
                    <ul style="width: 350px; float: left;">
                        <li>
                        <em>Out-of-the-box XHTML-enabled Output...</em>
                        </li>
                        <li>
                        <em>Unmatched Loading Speed and Performance</em>
                        </li>
                        <li>
                        <em>Microsoft Word-like Spell-checking</em>
                        </li>
                        <li>
                        <em>Seven Ways for Pasting from Word</em>
                        </li>
                        <li>
                        <em>Multilevel Undo/Redo with Action Trails</em>
                        </li>
                        <li>
                        <em>Extended Functionality Through Integrated Controls</em>
                        </li>
                    </ul>
                    <table width="500" style="margin: 0pt auto;clear:both;">
                        <thead>
                            <tr>
                                <th style="background-color: #ebf1dd;">Browser/OS</th>
                                <th style="background-color: #ebf1dd;">Windows</th>
                                <th style="background-color: #ebf1dd;">Mac OS</th>
                                <th style="background-color: #ebf1dd;">Linux</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td align="center" style="text-align: left; vertical-align: middle;"><img src="../../Img/BrowserIcons/ie.gif" alt="ie" style="float: left;" />&nbsp; Internet Explorer</td>
                                <td valign="top" style="background-color: #f2f2f2;">6.0+</td>
                                <td valign="top" style="background-color: #e5e0ec;">- </td>
                                <td valign="top" style="background-color: #dbeef3;">- </td>
                            </tr>
                            <tr>
                                <td><img src="../../Img/BrowserIcons/ff.gif" alt="ff" style="float: left;" />&nbsp; Firefox</td>
                                <td style="background-color: #f2f2f2;">1.5+</td>
                                <td style="background-color: #e5e0ec;">1.5+</td>
                                <td style="background-color: #dbeef3;">1.5+</td>
                            </tr>
                            <tr>
                                <td><img src="../../Img/BrowserIcons/chrome.gif" alt="chrome" style="float: left;" />&nbsp; Google Chrome</td>
                                <td style="background-color: #f2f2f2;">0.2+</td>
                                <td style="background-color: #e5e0ec;">5.0+</td>
                                <td style="background-color: #dbeef3;">5.0+</td>
                            </tr>
                            <tr>
                                <td><img src="../../Img/BrowserIcons/opera.gif" alt="opera" style="float: left;" />&nbsp; Opera</td>
                                <td style="background-color: #f2f2f2;">9.0+</td>
                                <td style="background-color: #e5e0ec;">9.0+</td>
                                <td style="background-color: #dbeef3;">-</td>
                            </tr>
                            <tr>
                                <td><img src="../../Img/BrowserIcons/safari.gif" alt="safari" style="float: left;" />&nbsp; Safari</td>
                                <td style="background-color: #f2f2f2;">3.0+</td>
                                <td style="background-color: #e5e0ec;">3.0+</td>
                                <td style="background-color: #dbeef3;">-</td>
                            </tr>
                            <tr>
                                <td><img src="../../Img/BrowserIcons/netscape.gif" alt="chrome" style="float: left;" />&nbsp; Netscape</td>
                                <td style="background-color: #f2f2f2;">9.0+</td>
                                <td style="background-color: #e5e0ec;">9.0+</td>
                                <td style="background-color: #dbeef3;">9.0+</td>
                            </tr>
                        </tbody>
                    </table>
                    <br />
                    <hr />
                    <sup><sup><a id="HTMLDescription">1.</a></sup>The computer language used to create world-wide-web pages which are read by browsers.</sup>
                 </Content>          
                </telerik:radeditor>
             </ContentTemplate>
             </asp:UpdatePanel>
        
            <qsf:footer runat="server" id="Footer1"/>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451