Thursday, December 27, 2012

Change Font in RichTextArea

How can one change the Default Font 'Times New Roman' to 'Arial' in the RichTextArea?
I tried to do:
richtextarea.addInitializeHandler(new InitializeHandler() {
public void onInitialize(InitializeEvent event) {
IFrameElement i =;
Document document = i.getContentDocument();
BodyElement body = document.getBody();
body.setAttribute("style", "font-family: Arial;");

But when I execute the 'i.getContentDocument()' I get an UmbrellaException...

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment