Rich Text Editor Style Sheets

12 views
Skip to first unread message

EricHolmberg

unread,
Jan 13, 2008, 1:17:08 AM1/13/08
to Google Web Toolkit
I didn't see a way to add style sheets to the Rich Text Editor or to
set the class type for any currently selection.

Looking through the code, it looks like I would have to either hack
into the Javascript to add the style sheet (undesirable) or copy the
code for the editor classes and add the tweaks (seems excessive).

Has anybody else been able to easily add a style sheet and/or set the
class type of the current selection (or add a span with the class
type) -- I may be making this harder than it needs to be.

I know this question is a bit vague at this point -- if I don't get a
quick answer, I'll add some more detail and we can go from there.

Thanks,

Eric

EricHolmberg

unread,
Jan 13, 2008, 11:20:14 PM1/13/08
to Google Web Toolkit
I went ahead and opened a ticket for the RichTextArea for this
feature.

* http://code.google.com/p/gwt-html-editor/issues/detail?id=27

I'm trying to do two separated (but related things):
1. Add a style sheet to the RichTextArea
2. Wrap any selected item in a "<span class='classStyleName'>Wrapped
text</span>" tag

This is not built into the existing framework and because the
framework uses the bridge pattern to separate the RichTextArea from
the implementations for IE6, Firefox, Opera, etc, it isn't possible
(as far as I can tell) to modify the classes. In addition, the
implementation class instance in RichTextArea is private, so I can't
derive off of it and add additional details.

Reply all
Reply to author
Forward
0 new messages