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

Apply CSS Class from different CSS file

3 Answers 51 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Zach
Top achievements
Rank 1
Zach asked on 10 Mar 2010, 08:22 PM
I think I already know the answer to this question, but thought I'd pose it as a suggestion if the functionality does not already exist.  We want the content of our RadEditor to look the same as it would once it is submitted (meaning it should pull in all the CSS files of the page it is on).  However, we only want the Apply CSS class dropdown to pull from a single CSS file that we specify.  The CssClasses route is not a solution for us, because the CSS file that should populate the dropdown might have anywhere between 1 and hundreds of declarations, all of which could change and would then have to be updated in two places.  So my question/suggestion is, is there any way to make the Editor display area pull in the page's styles, while forcing the "Apply CSS Class" dropdown to only pull in from a declared file?

Thanks.

3 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 11 Mar 2010, 08:38 PM
I assuming this is what your asking about or maybe I'm wrong, but here's the link to the help topic.


You can set the CssFiles collection and add the CSS files you want to include in the editor and it will use it as the base for the "Apply CSS Class" drop-down.
0
Zach
Top achievements
Rank 1
answered on 11 Mar 2010, 09:22 PM
This method also overrides the styles the main WYSIWIG region gets though.  I want the WYSIWIG to pull in the styles from the page, while the Apply CSS class dropdown only gets what I specify in a declaration similar to what you're talking about.
0
Rumen
Telerik team
answered on 12 Mar 2010, 05:36 PM
Hi Zach,

The requested feature is not supported out-of-the box by the Apply Class dropdown, which displays the classes applied to the content area. If you would like you can implement your own custom dropdown that will list only the classes that you want to display.


Regards,
Rumen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
Zach
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Zach
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or