Customize Spell Check Action

2 posts, 0 answers
  1. Brian
    Brian avatar
    1 posts
    Member since:
    Feb 2012

    Posted 16 Feb 2012 Link to this post

    I am interested in using Telerik RadSpell client side.  My specific need is that I want to be able to control the action performed on the replaced/corrected words.  Is there a way to bind to an event that will allow me to custom wrap the corrected word in some additional HTML?
  2. Rumen
    Rumen avatar
    12788 posts

    Posted 20 Feb 2012 Link to this post


    The misspelled words are highlighter by wrapping them in a span tag like this one:

    <span id="RadESpellError_5" class="RadEWrongWord">TechNet</span>

    The class RadEWrongWord is static and you can use it to locate the misspelled words. The ID is changed by adding the number of the misspelled word to the RadESpellError_ string.

    You can try to modify the contents of RadEditor when the spellcheck is launched in the add_spellCheckLoaded event, but you should know that this is not supported and could break the spellchecker:

    <script type="text/javascript">
        function OnClientLoad(sender, args)
            var timer = $find("<%=Timer1.ClientID %>");
            //Attach to the spellCheckLoaded event as the spell itself is loaded with AJAX
                    var spell = sender.get_ajaxSpellCheck();
                        function(sender, args)
                } );

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top