Re: Capture New and Delete Events

  •  05-14-2009, 3:35 AM

    Re: Capture New and Delete Events

    Hi robinsong,
     
    Try this way:
     
    ------------------------------------------------------------------------->
     

    <%@ Page Language="C#" EnableEventValidation="false" %>

    <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>
    <!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>
    </head>
    <body>
        <form>
            <CE:Editor ID="Editor1" runat="server">
            </CE:Editor>
        </form>
    </body>
    </html>

    <script language="JavaScript" type="text/javascript">
      var editor1=document.getElementById("<%=Editor1.ClientID%>");
      
      function CuteEditor_OnCommand(editor,command,ui,value)
      {
       
       if(command=="New")
       {
        alert("New");
        return true;
       }
       if(command=="Delete")
       {
        alert("Delete");
        return true;
       }
      }
    </script>

     ------------------------------------------------------------------------->
     
    Regards,
     
    Ken
View Complete Thread