<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default1.aspx.cs" Inherits="_Default1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!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>
    <style></style>
</head>
<body>
    <form id="form1" runat="server">
<asp:scriptmanager id="ScriptManager" runat="server" />	

    <telerik:radeditor runat="server" ID="RadEditor1" ToolsFile="~/ToolsFile1.xml" OnClientCommandExecuting="OnClientCommandExecuting">
    <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" />
    </telerik:radeditor>
    <script type="text/javascript">
    function OnClientCommandExecuting(editor, args)
    {
        var name = args.get_name();
        var val = args.get_value();
        if (name == "Emoticons")
        {
            editor.pasteHtml("<img src='" + val + "'>");
            //Cancel the further execution of the command as such a command does not exist in the editor command list
            args.set_cancel(true);
        }
    }
    </script> 


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