How to insert content in editor

  •  10-19-2004, 7:00 AM

    How to insert content in editor

    Hi again,

     
    I've my editor with a custom button defined this way:
     

    Dim Image1 As New System.Web.UI.WebControls.Image

    Image1.ID = "Test" 'This ID will be used in template

    Image1.ToolTip = "Test Button"

    Image1.ImageUrl = HttpContext.Current.Request.ApplicationPath + "/btnCopiar.gif"

    Image1.CssClass = "button"

    Image1.Attributes.Add("onclick", "insertHTML('Editor1','Testing...')")

    Image1.Attributes.Add("type", "btn")

    Editor1.RegisterCustomButton(Image1)
     
    And the editor shows the button, nice. But when I press the custom button, the text "Testing..." is inserted into the background of the page, out of the Editor.
     
    I've (cassually) found the insertHTML function, but there isn't documentation about it or about any client-side function, so I don't know if I'am using it correctly.
     
    So, how can I insert content by an custom button into the editor?
     
    Thanks in advance.
View Complete Thread