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?
1 Answer, 1 is accepted
0
Rumen
Telerik team
answered on 20 Feb 2012, 03:32 PM
Hi,
The misspelled words are highlighter by wrapping them in a span tag like this one:
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
sender.add_spellCheckLoaded(
function()
{
var spell = sender.get_ajaxSpellCheck();
spell.add_spellCheckStart(
function(sender, args)
{
});
} );
}
</script>
Regards,
Rumen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>