Hi Arji, I managed to do that, using the GWT RichTextArea widget. However you may face some incompatibilities, I noticed that RTA widget is not removed automatically on my GWT-EXT Panel destroy event, at least in FF3 it throws an exception, so it must to be done by hand. To do that you have to override the beforeDestroy hook on the panel, that uses the RTA widget:
@Override
protected void beforeDestroy() {
removeAll();
super.beforeDestroy();
}
Using styled text inside the RTA is simple, since it has a setHTML(String)
method. It also has getText() method to retrive the unformatted text, but it
is good to know, that the getText() method only removes the HTML tags and
not their content, so the css content of the <style> tag is also returned by
it. Workaround is using <span style="">, of course with huge content you can
use css, but then you have to remove the css manually.
See the attached scratch example. Hope, that answer is not too late.
- James
2008/11/10 Arji <[EMAIL PROTECTED]>
>
> Hi Everyone,
>
> Is it possible to have a Rich Text Editor and inserts Strings that has
> style?
>
> For example, I want to insert a Hello World in the Rich text area,
> where Hello has the font style bold and the World has a different font
> style?
>
> Thanks so much!
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---
HelloWorldPanel.java
Description: Binary data
