If it's a common webcontrol I may use those follow code to realize my function:
Image Image2= new Image();
Image2.ToolTip = "Insert today's date";
Image2.ImageUrl = "tools.gif";
Image2.CssClass = "CuteEditorButton";
Image2.Attributes["onclick"] = "document.getElementById('" + Editor1.ClientID + "').focus(); var slct=(document.selection)? (document.selection.createRange()): ((document.getSelection)?(document.getSelection()): null); if(slct ){slct.text='[vi]'+slct.text+'[/vi]';}else{}";
tc.Control.Controls.Add(Image2);
but it won't work on the CE.