#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0

    Add a radio button in RichTextArea


    There is a RichTextArea

    Code:
    private final RichTextArea rta = new RichTextArea();
    and I'd like when I press an asterisk to add a radio button in this RichTextArea.

    I wrote

    Code:
     if(event.getCharCode()=='*')
       {            
         RadioButton radio0 = new RadioButton("group0", "");
         HorizontalPanel hp = new HorizontalPanel();
         hp.add(radio0);
         RootPanel.get().add(hp);
       }
    it creates a radio button out of the RTA but I can't add it in the RTA, specifically where the cursor is and without the asterisk.

    Any idea how to do that? Thank you very much for any help in advance.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0
    if(event.getCharCode()=='*')
    {
    rta.setHTML("<input type=radio name=name value=1>");
    }
    In that way I create and add the radiobutton into the richtextarea but in Firefox is not clickable. In Chrome works fine. Any idea please!!!

IMN logo majestic logo threadwatch logo seochat tools logo