Add your own custom buttons
You can easily add your own custom buttons to the CuteEditor toolbar using the
following method:
Add your own custom buttons into the custom button holder:
- <%
- Dim editor
- Set editor = New CuteEditor
-
- editor.ID = "Editor1"
- editor.Text = "Type Here"
- editor.TemplateItemList="G_start,Bold,Italic,Holder,G_end"
- editor.CustomAddons = "<img class=""CuteEditorButton"" onmouseover=""CuteEditor_ButtonCommandOver(this)"" onmouseout=""CuteEditor_ButtonCommandOut(this)"" onmousedown=""CuteEditor_ButtonCommandDown(this)"" onmouseup=""CuteEditor_ButtonCommandUp(this)"" Command=""MyCmd"" src=""contact.gif"" />"
-
- editor.Draw()
-
-
-
- %>
-
- <script language="JavaScript" type="text/javascript" >
- vareditor1=document.getElementById("<%= editor.ClientID %>");
-
- function CuteEditor_OnCommand(editor,command,ui,value)
- {
- //handle the command by yourself
- if(command=="MyCmd")
- {
- //editor.ExecCommand("InsertTable");
- editor1.PasteHTML("Hello World");
- return true;
- }
- }
-
-
- </script>