RadEditor - Table Dialog - CSS Dropdown - TableLayoutCssFile - All page classes displayed, not just TableLayoutCssFile ones

0 Answers 78 Views
Editor
Paul
Top achievements
Rank 1
Paul asked on 18 Apr 2023, 08:07 AM

I've download the demo code for the Predefined table styles code, and I noticed that the CSS dropdown isn't limited to the classes in that document. Basically, any class on the page hosting the editor becomes available in there.

So if I add style .aardvark to the head of the page hosting the RadEditor, it becomes the first option in the CSS Dropdown despite it not appearing in TableLayoutCss.css. We have a lot of classes across our application that are applied to every page we render, so we don't want them all appearing in here.

In my case, the HTML users define here is rendered to PDF in the back office by a different tool, so I don't want any classes available for selection in the front end that aren't specifically in TableLayoutCss.css.

Has anyone hit this problem and managed to overcome it or is this expected behaviour of the TableLayoutCssFile option? As things stand, I'm having to tell the users to avoid using the CSS dropdown and go for the 'More Table Styling' button instead, but this clearly isn't as portable a solution as it should be!

Rumen
Telerik team
commented on 18 Apr 2023, 02:08 PM

If you do not want to list the CSS classes from the page, you can set the CssFiles property. You can also limit the CSS entries in the dropdown via the CssClasses collection

You can also check this forum thread: https://www.telerik.com/forums/styles-from-tablelayoutcssfile-loading-in-select-css-class-dropdown#3306615

No answers yet. Maybe you can help?

Tags
Editor
Asked by
Paul
Top achievements
Rank 1
Share this question
or