Problem with spellcheck

3 posts, 0 answers
  1. vikram
    vikram avatar
    15 posts
    Member since:
    Oct 2008

    Posted 07 Nov 2008 Link to this post

    I have three textboxes and one telerik editor. i am performing the spell check (using client side javascript)for all the three textboxes and editor, but some how i am unable to  perform spell check for editor which is not supporting javascript spell check( i performed  spell check as per example which you given in the demo examples). i am using 2008 version telerik. can u let me know solution for this very urgent.
  2. Rumen
    Rumen avatar
    12788 posts

    Posted 11 Nov 2008 Link to this post

    Hi Vikram,

    Here is the requested solution how to spellcheck three textboxes and one RadEditor on the page with external spellchecker:

        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadEditor ID="RadEditor1" Content="testt" runat="server">
            <telerik:EditorModule Name="test" Visible="false" />
        <asp:TextBox ID="TextBox1" runat="server">behaviour</asp:TextBox>
        <asp:TextBox ID="TextBox2" runat="server">behaviour</asp:TextBox>
        <asp:TextBox ID="TextBox3" runat="server">behaviour</asp:TextBox>
        <telerik:RadSpell ID="RadSpell1" runat="server" ButtonType="None" />
        <input id="Button1" type="button" value="Spell Check All" onclick="spellCheck();" />

           <script type="text/javascript">
           function MultipleTextSource(sources)
             this.sources = sources;
             this.get_text = function()
                var texts = [];
                for (var i = 0; i < this.sources.length; i++)
                   texts[texts.length] = this.sources[i].get_text();
                return texts.join("<controlSeparator><br/></controlSeparator>");
             this.set_text = function(text)
                var texts = text.split("<controlSeparator><br/></controlSeparator>");
                for (var i = 0; i < this.sources.length; i++)
           function spellCheck()
               var editorSource = $find('RadEditor1').get_contentAreaElement().contentWindow.document.body;
               var sources =
                       new Telerik.Web.UI.Spell.HtmlElementTextSource(editorSource),
                       new Telerik.Web.UI.Spell.HtmlElementTextSource($get('TextBox1')),
                       new Telerik.Web.UI.Spell.HtmlElementTextSource($get('TextBox2')),
                       new Telerik.Web.UI.Spell.HtmlElementTextSource($get('TextBox3'))
               var spell = $find('<%= RadSpell1.ClientID %>');
               spell.set_textSource(new MultipleTextSource(sources));

    For your convenience I have attached my test page.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
  4. vikram
    vikram avatar
    15 posts
    Member since:
    Oct 2008

    Posted 24 Nov 2008 Link to this post

    Hello Rumen,

        Thanks for you help. Its working fine.

    Thanks & Regards,
Back to Top