This is a migrated thread and some comments may be shown as answers.

[Solved] How to "Styles, RadEditor & You"?

2 Answers 200 Views
Editor
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 27 Oct 2007, 08:26 PM
Is there any place I might find a "best practices" or "how-to" guide on using the RadEditor in relation to a sites style sheets (that seem to affect both its display and the display of its content)?

Basically, I'm trying to add editing to existing sites so that the end users can modify the HTML themselves. The problems I'm running into though are that the sites CSS files often distort the display of the RadEditor itself. When I overcame that, I realized that in some cases (not all), I'd like those styles to apply to the content within the editor. So what I'm getting at is that I'm finding my way, but I can't be the first and I'd love any advice anyone has.

Thanks!

James

2 Answers, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 27 Oct 2007, 08:49 PM
Hey, this may qualify as a suggestion or further indication of how off base I am. You decide:

If you set the ContentSectionStylesheet, the file is added to the links section of the IFrame, but immediately before the stylesheets that the control inserts itself. So in the whole "cascading" thing, you lose the ability to override styles that you don't want applying to your editor content. Can the stylesheet you specify come last in the list so that it can be used either to suppliment or override styles from the page the IFrame references?

Thanks!

James
0
Tervel
Telerik team
answered on 29 Oct 2007, 03:35 PM
Hello James,

By default RadEditor copies into its content area the stylesheets available on the page. It also imports the extra ContentSectionStylesheet to provide styling for table borders, among other things.

However, you can easily take over what CSS is available to the editor by using the CssFiles property to specify a list of css files to be imported in the editor [then the editor does not copy styling from its parent page]

Can you let us know whether you used this property and whether you encountered any problem?
We are not sure about the exact nature of the css overriding problems that you seem to be having.


Sincerely yours,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or