how can I customize Insert Image Icon in the tool bar of Cute Editor

Last post 12-10-2013, 7:56 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  12-10-2013, 5:31 AM 78553

    how can I customize Insert Image Icon in the tool bar of Cute Editor

    Hi,

     

            I am using Cute Editor in my asp.net website, Now I want to customize the Insert Image icon and in that icon click I

     

    want to show pop up of ASP.Net Image Gallery(Classic Layout), I tried in a sample aspx page, In a button click I am

     

    displaying the Gallery, But in the Cute Editor's Insert Image icon click I have to show it.  

     

    How can I achieve it..

     

    Please help me and try to give quick reply..

     

    Thanks in advance.. 


    Regards,
    Narendra
  •  12-10-2013, 7:56 AM 78557 in reply to 78553

    Re: how can I customize Insert Image Icon in the tool bar of Cute Editor

    hi narendrababu,

     

    You can catch the InsertImage command and cancel this command then execute the InsertGallery command. Below is the full example. 

     

    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. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <title>example</title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <CE:Editor ID="Editor1" runat="server">  
    12.         </CE:Editor>  
    13.         <script type="text/javascript">  
    14.         function CuteEditor_OnCommand(editor,command,ui,value)  
    15.          {  
    16.             //catch the InsertImage command  
    17.            if(command=="InsertImage")  
    18.            {  
    19.                 //execute command InsertGallery  
    20.                 editor.ExecCommand("ImageGalleryByBrowsing");  
    21.                 //return true to cancel the InsertImage command  
    22.                 return true;  
    23.            }  
    24.              
    25.         }  
    26.         </script>  
    27.     </form>  
    28. </body>  
    29. </html>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML