| Cute Editor for ASP |
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 content content = "<H1><FONT color=#2f4f4f>Customized Toolbar</FONT></H1>" Dim editor Set editor = New CuteEditor editor.ID = "Editor1" editor.Text = content editor.FilesPath = "CuteEditor_Files" editor.ShowBottomBar = false editor.TemplateItemList="G_start,Bold,Italic,Underline,Separator,JustifyLeft,JustifyCenter,JustifyRight,Holder,G_end" editor.CustomAddons = "<img title=""Using oncommand"" class=""CuteEditorButton"" onmouseover=""CuteEditor_ButtonCommandOver(this)"" onmouseout=""CuteEditor_ButtonCommandOut(this)"" onmousedown=""CuteEditor_ButtonCommandDown(this)"" onmouseup=""CuteEditor_ButtonCommandUp(this)"" ondragstart=""CuteEditor_CancelEvent()"" Command=""MyCmd"" src=""CuteEditor_Files/images/contact.gif"" />" editor.Draw() ' Request.Form(ID) access from other page %> <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> |
© 2003 - 2008 CuteSoft.Net. All rights reserved.