Regarding Insert Image in Cute Editor

Last post 07-01-2014, 9:22 AM by Kenneth. 19 replies.
Sort Posts: Previous Next
  •  03-03-2014, 9:12 AM 80008

    Regarding Insert Image in Cute Editor

    Hi,

     

           I am using Cute Editor in  website and Image Gallery (Both are Cute Soft Products).  I am showing Cute soft Image Gallery (Classic

     

    layout)  my project every where  and for the button click of  'Insert  Image' in the editor also.  My requirement is that in the editor I

     

    placed an image, now I want to replace that image with another image as by doing right click on that image a menu dialog will appear

     

    with following options:  undo, Cut, Copy, Paste, Insert etc ..  Now when we select 'Insert' option in that sub menu Image option is there.

     

    In that click default Editor's Image Gallery is loading. But I want to customize it and want to show Image Gallery (Classic Layout) in that 

     

    click. Where I can find that click event.  I want to fire that 'Image' click event..

     

    Please see the attached file and try to give quick reply..

     

     

     

     

    Thanks in advance.. 


    Regards,
    Narendra
  •  03-04-2014, 8:07 AM 80015 in reply to 80008

    Re: Regarding Insert Image in Cute Editor

    Hi narendrababu,

     

    Please add the code below to the bottom of your page, it will catch this command, and you can achieve your own logic there. 

     

    1. <script type="text/javascript">  
    2. function CuteEditor_OnCommand(editor,command,ui,value)  
    3.  {  
    4.     if(command=="InsertImage")  
    5.     {  
    6.         //achieve your own code here  
    7.         //return true will disable the default command  
    8.        return true;  
    9.     }  
    10.       
    11. }  
    12. </script>  
     

    Regards,

     

    Ken 

  •  03-06-2014, 4:40 AM 80023 in reply to 80015

    Re: Regarding Insert Image in Cute Editor

    Hi,

     

              Thanks for your valuable reply, the code you provided working fine.The code I put as follows..

           

               <script type="text/javascript">  

                function CuteEditor_OnCommand(editor,command,ui,value)  

                {  

                     if(command=="InsertImage")  

                      {  

                           thegallerybrowser.ShowEditor();

                           return true;

                           return false;

                     }  

               }  

              </script>

     

                     I am showing Image Gallery (classic Layout).

     

    Requirement:  If already an image is in the cute editor, Now I want to replace that image with new Image by right click on existing image

     

    and click Insert  Image option select new image from our Image Gallery (Not Cute Editor's Gallery).

     

    How can  achieve this.. 

     

    Please revert back me as soon as possible.. 

     


    Regards,
    Narendra
  •  03-06-2014, 8:05 AM 80024 in reply to 80023

    Re: Regarding Insert Image in Cute Editor

    Hi narendrababu,

     

    You can refer to example http://cutesoft.net/example/howto/AddDialogs/cs/create_a_custom_dialog.aspx , it shows you how to replace the selected content from the separate dialog.

     

    Regards,

     

    Ken 

  •  03-11-2014, 9:04 AM 80051 in reply to 80024

    Re: Regarding Insert Image in Cute Editor

    Hi,

     

                    I am asking about,  If I had an image in Cute Editor, I want to replace that image with new Image, Actually now happening we

     

    will double click on that image then one popup will come as below.

     

                            

     

    there we can browse Image and place in our editor.

     

    Now my requirement is that I want to override that popup with my Image Gallery (Cutesoft ASP.Net Image Galley Classic Layout). I

     

    double click on the Image (Already selected image) in the Editor I want to show my Image Gallery. 

     

    Where  I can handle that double click event to show my gallery and when I select image in my gallery I want to replace that existing 

     

    Image with the new selected image from  my Gallery.

     

    Please try to understand and give me quick reply..

     

    Thanks in advance. 


    Regards,
    Narendra
  •  03-12-2014, 9:10 AM 80063 in reply to 80051

    Re: Regarding Insert Image in Cute Editor

    Hi narendrababu,

     

    I think can not achieve this requirement for now.

     

    Regards,

     

    Ken 

  •  03-20-2014, 7:20 AM 80113 in reply to 80051

    Replace Image by double click on the image in the editor.

    Hi,

     

                    I am asking about,  If I had an image in Cute Editor, I want to replace that image with new Image, Actually now happening we

     

    will double click on that image then one popup will come as below.

     

                            

     

    there we can browse Image and place in our editor.

     

    Now my requirement is that I want to override that popup with my Image Gallery (Cutesoft ASP.Net Image Galley Classic Layout). I

     

    double click on the Image (Already selected image) in the Editor I want to show my Image Gallery. 

     

    Where  I can handle that double click event to show my gallery and when I select image in my gallery I want to replace that existing 

     

    Image with the new selected image from  my Gallery.

     

    Please try to understand and give me quick reply..

     

    Thanks in advance.. 


    Regards,
    Narendra
  •  03-21-2014, 9:26 AM 80125 in reply to 80113

    Re: Replace Image by double click on the image in the editor.

    Hi narendrababu,

     

    Can not achieve this requirement for now. Sorry for your inconvenience.

     

    Regards,

     

    Ken 

  •  05-23-2014, 9:24 AM 80316 in reply to 80125

    Re: Replace Image by double click on the image in the editor.

    Hi Ken,

     

                      In the above Image I want to customize the 'Browse'  button. When I double click on Image in the Editor then One Popup will display, In that Popup I want to Customize the 'Browse' button functionality. I want to replace My own Image Gallery on that browse button. How can I acheive it. 

     

    Please try to give quick reply..

     

    Thanks in advance.. 


    Regards,
    Narendra
  •  05-23-2014, 10:01 AM 80317 in reply to 80316

    Re: Replace Image by double click on the image in the editor.

    hi,

     

    Please open file "\CuteSoft_Client\CuteEditor\Dialogs\Tag\tag_image.ascx" and find section below, that is the browse button, the simple way is that hide this button and create your own button there, so you can achieve any function with the new button.

     

    <input type="button" id="btnbrowse" value="[[Browse]]" class="formbutton" /> 

     

    Regards,

     

    Ken 

  •  05-23-2014, 12:04 PM 80318 in reply to 80317

    Re: Replace Image by double click on the image in the editor.

    Hi ken,

     

                   I found that button and hidden it, I create new Button insted of it. Now I want to show my Image Gallery insted of it. Where I

     

    can write javascript code to show my Galley , If I want to show my Gallery I have to Register NameSpace and I have to give folder path to 

     

    that Gallery. Where I can do all these functionalities. It is a user controller file and these things are not possible in it (ascx file). 


    Regards,
    Narendra
  •  05-23-2014, 12:06 PM 80319 in reply to 80317

    Re: Replace Image by double click on the image in the editor.

    Hi ken,

     

                   I found that button and hidden it, I create new Button insted of it. Now I want to show my Image Gallery insted of it. Where I

     

    can write javascript code to show my Galley , If I want to show my Gallery I have to Register NameSpace and I have to give folder path to 

     

    that Gallery. Where I can do all these functionalities. It is a user controller file and these things are not possible in it (ascx file).

     

    I mean How I can take my custom browse button (in tag_image.ascx) to my aspx page.

     

    How can achieve it.  Please Help me.. Thanks in advance.. 

     

     


    Regards,
    Narendra
  •  05-23-2014, 1:16 PM 80320 in reply to 80319

    Re: Replace Image by double click on the image in the editor.

     Hi narendrababu,

     

    If you just need to open your galley page, then use the javascript method below to open your own page.

     

    window.open("http://www.google.com", "_blank") ;

     

    Regards,

     

    Ken 

  •  05-27-2014, 7:17 AM 80321 in reply to 80320

    Re: Replace Image by double click on the image in the editor.

    Hi ken,

     

              That is not my requirement, Here I want to open Gallery means not to open a new page or New Tab. Asyncronously one pop up

     

    will be displayed in a button click In that popup our image gallery will be.  Ok Leave it. 

     

    I found this tag in .ascx file  <input type="button" id="btnbrowse" value="[[Browse]]" class="formbutton" />

     

    Can I inherit this control Id into my .aspx Page. Or can I modify this control Id (btnbrowse) in my .aspx page. Like in past I asked you

     

    how I can customize Image icon click, Then you gave me code as follows.

     

      function CuteEditor_OnCommand(editor, command, ui, value) {

                if (command == "InsertImage") {

                      thegallerybrowser.ShowEditor();

                      return true;

                      return false;

                  } 

    }

     

     

    Like the above code Can I able to customize btnBrowse Click.  Please give me solution as early as possible..

     

    Thanks in advance.. 


    Regards,
    Narendra
  •  05-27-2014, 9:13 AM 80322 in reply to 80321

    Re: Replace Image by double click on the image in the editor.

    Hi narendrababu,

     

    It is different, the InsertImage is an editor command, so you can catch it on page, but this browse button just a simple html button. This button click event is encrypted in a js file, so can not customize it. I still do not understand why you need to customzie the button click  event, you can simply replace it with your own button, so you can use any code in your own button click event.

     

    Regards,

     

    Ken 

  •  05-27-2014, 9:49 AM 80323 in reply to 80322

    Re: Replace Image by double click on the image in the editor.

    Hi Ken,

     

             My client asked me that remove alla default Image Galleries for the Cute Editor and replace those all with ASP.Net Image Gallery

     

     (CuteSoft). That's Why I am asking that.  I want to inherit that btnBrowse control in .ascx file into myu .aspx file then I can able to write 

     

    javascript code to open My Image Gallery in it's click event. But How can I get that control Id in to my .aspx page.


    Regards,
    Narendra
  •  05-27-2014, 9:49 AM 80324 in reply to 80322

    Re: Replace Image by double click on the image in the editor.

    Hi Ken,

     

             My client asked me that remove all default Image Galleries for the Cute Editor and replace those all with ASP.Net Image Gallery

     

     (CuteSoft). That's Why I am asking that.  I want to inherit that btnBrowse control in .ascx file into myu .aspx file then I can able to write 

     

    javascript code to open My Image Gallery in it's click event. But How can I get that control Id in to my .aspx page.


    Regards,
    Narendra
  •  06-10-2014, 2:32 AM 80333 in reply to 80324

    Re: Replace Image by double click on the image in the editor.

    narendrababu,

     

    We cannot achieve this request.  It is not easy to integrate asp.net image gallery into RTE. It's better to use the built-in image gallery.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-01-2014, 1:40 AM 80356 in reply to 80322

    Customize the clicks for Image Gallery

     

    Hi Ken,

     

          I want to customize that "Image" and "Browse Images" click  in the above Image. I want to open my Image Gallery (Cutesoft DotNet Gallery 

     

    Classic Layout). Previously I asked you this question and You gave me the below code.

     

    1. script type="text/javascript">  
    2. function CuteEditor_OnCommand(editor,command,ui,value)  
    3.  {  
    4.     if(command=="InsertImage")  
    5.     {  
    6.         //achieve your own code here  
    7.         //return true will disable the default command  
    8.        return true;  
    9.     }  
    10.       
    11. }  
    12. </script>  

     

      It's worked fine then. But now I checked, it's not working on those clicks I put an alert message, It's not firing. Please provide me updated code.

     

    Thanks in advance..

    Narendra 


    Regards,
    Narendra
  •  07-01-2014, 9:22 AM 80359 in reply to 80356

    Re: Customize the clicks for Image Gallery

    Hi,

     

    Please try the example page below.

     

    1. <%@ Page Language="C#" MaintainScrollPositionOnPostback="true" %>  
    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.     </form>  
    14. </body>  
    15. </html>  
    16.   
    17. <script type="text/javascript">        
    18.   
    19. function CuteEditor_OnCommand(editor,command,ui,value)    
    20.  {  
    21.     if(command=="InsertImage")    
    22.     {    
    23.         alert("insert image dialog");  
    24.        //return true;    
    25.     }    
    26.         if(command=="ImageGalleryByBrowsing")    
    27.     {    
    28.         alert("insert gallery dialog");  
    29.        //return true;    
    30.     }    
    31.         
    32. }    
    33. </script>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML