Hello,
I'm trying to create a custom button in the toolbar to clear all the content. After a user clicks on it, he cannot focus the content window at all. I've also added FocusDocument method, but it still doesn't work.
Is there anything wrong with my code?
Thanks a lot!
'CLEAR ALL BUTTON
Dim ctrl As System.Web.UI.WebControls.WebControl
ctrl = ce_description.CreateCommandButton("MyButton", "delete.gif", "Clear Content")
ctrl.Attributes("onclick")="var ce = CuteEditor_GetEditor(this); ce.setHTML(''); ce.FocusDocument()"
'get the pos after the Italic
Dim pos As Integer
pos = ce_description.ToolControls.IndexOf("Italic") + 1
'add this custom button into the editor
ce_description.InsertToolControl(pos, "MyButton", ctrl)