delete all content - cannot focus Editor content window afterwards

Last post 05-19-2006, 10:28 AM by pistik. 2 replies.
Sort Posts: Previous Next
  •  05-11-2006, 8:51 AM 19046

    delete all content - cannot focus Editor content window afterwards

    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!
     
    CODE:
     
    '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)  
     
  •  05-11-2006, 1:45 PM 19052 in reply to 19046

    Re: delete all content - cannot focus Editor content window afterwards

    pistik,
     
    I tried your code. It works ok here.
     
    Can you tell me which version of Cute Editor are you using?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-19-2006, 10:28 AM 19332 in reply to 19052

    Re: delete all content - cannot focus Editor content window afterwards

    Hi Adam,
    I'd been using 5.0
    Just upgraded to 5.3 and that fixed the problem
    Thanks.
View as RSS news feed in XML