Re: AttachEvent for characters left

  •  03-18-2014, 11:14 AM

    Re: AttachEvent for characters left

    Hi SJochums,

     

    Then I suggest you remove the undo/redo button from the toolbar and create your custom button to achieve the undo/redo command, so you can fire another command after them. Like the example below.

     

    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5.   
    6. <script runat="server">  
    7.     protected override void OnLoad(EventArgs e)  
    8.     {  
    9.         CuteEditor.ToolControl tc = editor1.ToolControls["mybutton"];  
    10.         if (tc != null)  
    11.         {  
    12.             System.Web.UI.WebControls.Image Image1 = new System.Web.UI.WebControls.Image();  
    13.             Image1.ImageUrl = "http://cutesoft.net/CuteSoft_Client/CuteEditor/Images/undo.gif";  
    14.             Image1.CssClass = "CuteEditorButton";  
    15.             Image1.Attributes["onclick"] = "CuteEditor_GetEditor(this).ExecCommand('Undo');alert('fire after undo!');";  
    16.             tc.Control.Controls.Add(Image1);  
    17.         }    
    18.         base.OnLoad(e);  
    19.     }  
    20. </script>  
    21.   
    22. <html xmlns="http://www.w3.org/1999/xhtml">  
    23. <head id="Head1" runat="server">  
    24.     <title>example</title>  
    25. </head>  
    26. <body>  
    27.     <form id="form1" runat="server">  
    28.         <CE:Editor ID="editor1" runat="server" TemplateItemList="[Bold,Italic]/[mybutton]" >  
    29.         </CE:Editor>  
    30.     </form>  
    31. </body>  
    32. </html>  
     

    Regards,

     

    Ken 

View Complete Thread