How to customize editor

Last post 03-14-2012, 4:22 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  03-13-2012, 9:21 PM 73439

    How to customize editor

    I just recently purchased the .Net 6.6 version and am trying to figure out how to:
    1. Customize so that every editor I add to a web page will apply specific default settings. For example
      1. Editor1.EditorOnPaste = CuteEditor.PasteBehavior.PasteText
      2. Editor1.ShowHtmlMode = False
      3. Editor1.ShowPreviewMode = False
      4. Etc.
        I don't want to have to edit every page that contains an editor.
    2. How can one modify the InsertImage.aspx page where I want to disable the <div id="browse_Frame">section, so I can create my own code to build my image list from our SQL database. I am just looking for how best to disable the above DIV so that the code does not bother to try and get the list of images from the server.
    3. When a user clicks on one of the dialogs (Insert image, Insert hyperlink, etc.), how can I get the ID of the editor that called the dialog

     I was able to make all these modifications in the ASP version, but I am not able to see how to do these things in the .Net version.

    Would really appreciate your assistance.
  •  03-14-2012, 4:22 AM 73440 in reply to 73439

    Re: How to customize editor

    HI demmett,
     
    #1
     
    I suggest you create the editor in an asp.net UserControl, and set the special settings for this editor. Then you can add this user control into each web page, it will has the default properties settings you need.
     
    #2
     
    Please try the demo below, it use the custom data provider to store the images into the database, not in the file system. 
     
    #3
     
    You can catch the editor id in the OnCommand API. Add the code below to the bottom of the page, it will shows the editor id for every command.
     
    <script>
    function CuteEditor_OnCommand(editor,command,ui,value)
     {
         alert(editor.id.replace("CE_","").replace("_ID",""));
     }
    </script>
     
     
    Regards,
     
    Ken 
View as RSS news feed in XML