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

Styles from TableLayoutCSSFile loading in "Select CSS Class" dropdown

3 Answers 20 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 09 Oct 2014, 03:14 PM
We have had our RadEditor working with a custom editor CSS file for a while, and the "Select CSS Class" dropdown properly shows just the classes in that file. I've been asked to add a TableLayoutCSSFile to provide a custom table format. Once I add the table file to the config, the table styles begin showing in the class dropdown.

Is there any way to prevent this? We don't want users to have to scroll through tons of table styles, just to get to the content styles at the bottom of the list.

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 10 Oct 2014, 07:18 AM
Hello Nick,

You can reconfigure the items shown in the Apply Css Class tool via the CssClasses collection of the RadEditor. 

For example, lets say we have a CssFile file with the selector .VisibleClass and a TableLayoutCSSFile  file with the selector - .nonVisisbleClass.

TableLayoutCssFile.css
.nonVisibleClass {
}

FormattingStyles.css
.VisibleClass {
}

RadEditor config
<telerik:RadEditor runat="server" ID="RadEditor1" NewLineMode="P" TableLayoutCssFile="~/TableLayoutCssFile.css">
    <CssFiles>
        <telerik:EditorCssFile Value="~/FormattingStyles.css" />
    </CssFiles>
    <CssClasses>
        <telerik:EditorCssClass Name="Visible Class" Value=".VisibleClass" />
    </CssClasses>
</telerik:RadEditor>

Result - see attached screenshot
RadEditor - Apply Css Class tool

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Nick
Top achievements
Rank 1
answered on 20 Oct 2014, 02:13 PM
Is this something that can be accomplished with the configfile.xml?
0
Ianko
Telerik team
answered on 21 Oct 2014, 11:35 AM
Hello Nick,

Yes you can. A detail demonstration how to configure a ToolsFile xml file to define the classes is available in this help article.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Nick
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Nick
Top achievements
Rank 1
Share this question
or