ASPxHtmlEditor.CssFiles Property

Gets a collection of items that refer to external CSS files associated with the ASPxHtmlEditor object.

Namespace: DevExpress.Web.ASPxHtmlEditor

Assembly: DevExpress.Web.ASPxHtmlEditor.v20.2.dll


public HtmlEditorCssFileCollection CssFiles { get; }

Property Value

Type Description

An HtmlEditorCssFileCollection object that represents the collection of items identifying the external CSS files.


The CssFiles property allows you to specify your custom CSS files to apply to the editor.

The code sample below demonstrates how to add a CSS file to the collection.

protected void Page_Load(object sender, EventArgs e) {
    HtmlEditorCssFile cssFile = new HtmlEditorCssFile("~/CSSFiles/Styles.css");

The code sample below demonstrates how you can specify CSS rules for the body tag to define the standard text style within the ASPxHtmlEditor.


body.dxhedesignviewarea, /* or body.dxhedesignviewarea_{theme postfix} if you are using ASPxHtmlEditor has the non-default theme */
body {
  font-family: Tahoma;
  font-size: 12pt;


This example illustrates how to customize the ASPxHtmlEditor's placeholders by using CSS styles.

View Example

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register assembly="DevExpress.Web.ASPxHtmlEditor.v16.1, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxHtmlEditor" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v16.1, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxSpellChecker.v16.1, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxSpellChecker" tagprefix="dx" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
            <dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
                <SettingsPlaceholders StartMark="[%" EndMark="%]" />
                    <dx:HtmlEditorCssFile FilePath="~/ContentStyles.css" />
                    <dx:HtmlEditorPlaceholderItem Value="FirstName" />
                    <dx:HtmlEditorPlaceholderItem Value="Date" />
See Also