Is there any way to style rich text editors? I've tried stylename, baseStyle, backgroundColor and none of them work. I want to change the color of the textarea
Announcement
Collapse
No announcement yet.
X
-
There are no public / supported APIs for styling the RichTextEditor editing area.
There is an unsupported way to do this - RichTextEditor has an auto-child - the "editArea". You can use editAreaProperties to set attributes that will effect the actual editable area.
There's also an attribute specifically covering the background color: "editAreaBackgroundColor".
This is not currently public as the native editing implementation varies by browser and we can't guarantee cross browser support for all standard Canvas attributes. Changing the css stylename or background color will probably be safe but be aware that you're going "off piste" here, so should test cross browser.
We also can't guarantee that we won't change how this is implemented in the future - however if we do we will be sure to update this thread with details.
Regards
Isomorphic Software
-
Ok - my main problem was the cross-browser implementation. We found that a stylesheet with an entry for iFrame was changing the background color of the richtext editor in Firefox but not in IE because in IE it uses a div. So I thought setting a separate styling would override this behaviour.
Comment
-
We don't have a way to apply an explicit styling directly to the IFrame written out by the RichTextEditor, so if you have a global iframe styling declared in your CSS it will impact the RichTextEditor's IFrame.
This kind of issue can come up with basically any global css type selectors -- for example if you applied a style to all "table" elements you'd see this effect the rendering of many SmartClient components since we use the HTML tag within the generated HTML for some components.
We would usually recommend, rather than using global type selectors, you apply an explicit style className to the IFRAME(s) you want to style within your application, or possibly use selectors to reference the iframes in question if an explicit style name is out of the question.
Comment
-
Originally posted by IsomorphicThere is an unsupported way to do this - RichTextEditor has an auto-child - the "editArea". You can use editAreaProperties to set attributes that will effect the actual editable area.
There's also an attribute specifically covering the background color: "editAreaBackgroundColor".
Still, if possible, I also wouldn't mind being able use custom styled buttons on the RichTextEditor's toolstrip which call the same functions of the SmartClient RichTextEditor control objects on the same instantiated editor applying effect on the same editing area.Last edited by JoJeff; 2 Jun 2012, 03:20.
Comment
Comment