简体   繁体   中英

add a radio button in RichTextArea

There is a RichTextArea

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

 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.

Can you really add a radio button to richtext area!!! I really don't know But if you can then the answer may be: You have added radio button to root panel and not richtext area.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM