Alex,
I forgot to mention that you can add a style to the body element as I
shown, but it will do nothing. The reason is that the HTML document inside
the RichTextArea does not have access to your CSS file. You can solve it
this way (I use this solution, so I tested it):
public MyRichTextArea() {
addInitializeHandler(new InitializeHandler() {
public void onInitialize(InitializeEvent ie) {
Document document =
IFrameElement.as(getElement()).getContentDocument();
BodyElement body = document.getBody();
HeadElement head =
HeadElement.as(Element.as(body.getPreviousSibling()));
LinkElement styleLink = document.createLinkElement();
styleLink.setType("text/css");
styleLink.setRel("stylesheet");
styleLink.setHref("MyRichTextArea.css");
head.appendChild(styleLink);
}
});
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/D1hWamk3nJYJ.
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/google-web-toolkit?hl=en.