RadEditor for ASP.NET

RadEditor Send comments on this topic.
CssFiles Property
See Also  Example
Telerik.WebControls Namespace > RadEditor Class : CssFiles Property


Gets or sets the list of external CSS files that should be made available in the editor's content area.   

 

Namespace: Telerik.WebControls
Assembly: RadEditor (in RadEditor.dll)

Syntax

Visual Basic (Declaration) 
Public Property CssFiles As String()
Visual Basic (Usage)Copy Code
Dim instance As RadEditor
Dim value() As String
 
instance.CssFiles = value
 
value = instance.CssFiles
C# 
public string[] CssFiles {get; set;}

Return Value

A string array containing the names of the external CSS files that should be available in the editor's content area.

Example

This example demonstrates how to set the CssFiles property from the code-behind.

If you want to set it in the ASPX/ASCX use the following syntax

<rade:radeditor cssfiles="~/styles/1.css,~/styles/2.css" ... ><rade:radeditor>

Visual BasicCopy Code
RadEditor1.CssFiles = New String(2) {"~/styles/1.css", "~/styles/2.css"}
C#Copy Code
RadEditor1.CssFiles = new string[2] {"~/styles/1.css", "~/styles/2.css"};
    

Remarks

By default, RadEditor uses the CSS classes available in the current page. However, it can be configured to load external CSS files instead. This scenario is very common for editors integrated in back-end administration areas, which have one set of CSS classes, while the content is being saved in a database and displayed on the public area, which has a different set of CSS classes.

If this property is set the RadEditor loads only the styles defined in these files. The styles defined in the current page are not loaded in the dropdown.

If you want to load only a subset of the defined classes you can use the CssClasses property.

Requirements

RadEditor 5.0 and above.

See Also