Hi dubi,
The example page below shows you how to add the custom button to the end of the toolbar.
- <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
-
- <%@ Page Language="c#" %>
-
- <html>
- <head>
- <title>example</title>
- </head>
-
- <script runat="server">
- private void Page_Load(object sender, System.EventArgs e)
- {
-
- int pos = Editor1.ToolControls.IndexOf("JustifyRight") + 1;
- WebControl ctrl = Editor1.CreateCommandButton("MyButton", "text.gif", "Insert My Custom Text");
- ctrl.Attributes["onclick"] = "alert('test');";
-
- Editor1.InsertToolControl(pos, "MyButton", ctrl);
- }
- </script>
-
- <body>
- <form runat="server" id="Form1">
- <CE:Editor ID="Editor1" AutoConfigure="Minimal" runat="server" />
- </form>
- </body>
- </html>
Regards,
Ken