<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="sc1" runat="server"></asp:ScriptManager>

<telerik:RadEditor ID="RadEditor1" runat="server"></telerik:RadEditor>
<input type="button" onclick="checkSpelling();return false;" value="SpellCheck and Submit" />
<script type="text/javascript">
function checkSpelling() 
{ 
    var editor = $find("<%=RadEditor1.ClientID %>"); //get reference to RadEditor's instance 
    editor.fire("AjaxSpellCheck"); //execute the RadEditor's command "AjaxSpellCheck" 
    editor.add_spellCheckLoaded(function()
    { 
        var spell = editor.get_ajaxSpellCheck();  //get a reference to RadEditor's SpellCheck 
        //save the content and submit the form when the spellchecker ends
        spell.add_spellCheckEnd(function(sender, args) 
        { 
            editor.saveContent(); //save the content before submission
            document.forms[0].submit(); //submit the form
        }); 
    }); 
}
</script>
<div>
    <asp:Label ID="Label1" runat="server" Text="Saved Content"></asp:Label>
</div>


    </form>
</body>
</html>
    

