gwt - How to Make a RichTextArea with the tool bar like in the samples -


i have searched on stackoverflow same question , found same question not fix problem answer question. anyways new gwt , when tried make richtextarea, thought make sample in http://www.gwtproject.org/doc/latest/refwidgetgallery.html (scroll down till see richtextarea) instead there plain text area without tool bar. how come there no tool bar in mine? can me , can show me how change code looks sample. figured might have formatter or getformatter method if can show me how that. here code:

import com.google.gwt.core.client.entrypoint; import com.google.gwt.event.dom.client.clickevent; import com.google.gwt.event.dom.client.clickhandler; import com.google.gwt.user.client.ui.button; import com.google.gwt.user.client.ui.richtextarea; import com.google.gwt.user.client.ui.richtextarea.formatter; import com.google.gwt.user.client.ui.rootpanel;  public class widgets implements entrypoint  { private button btn; private button cbtn; private richtextarea textarea;        public void onmoduleload()      {          btn = new button("submit");          cbtn = new button("clear");          textarea = new richtextarea();          formatter format = textarea.getformatter();           cbtn.addclickhandler(new clickhandler(){          public void onclick(clickevent event) {         textarea.settext("");            }     });      rootpanel.get().add(textarea);     rootpanel.get().add(btn);     rootpanel.get().add(cbtn);     }  } 

take @ gwt showcase, here. in source code can see there richtexttoolbar, need instantiate , associate richtextarea.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -