Skip to main content

HtmlEditorCssFile Class

Represents a link to the CSS file.

Namespace: DevExpress.Web.ASPxHtmlEditor

Assembly: DevExpress.Web.ASPxHtmlEditor.v23.1.dll

NuGet Package: DevExpress.Web


public class HtmlEditorCssFile :

The following members return HtmlEditorCssFile objects:


The HtmlEditorCssFile represents a link to the CSS file which is linked to the web project. The HtmlEditorCssFile objects are held within the HtmlEditorCssFileCollection object and can be accessed by using the Collection<T>.Item property.

The path to a CSS file, which is referred to by the HtmlEditorCssFile object, can be defined via the HtmlEditorCssFile.FilePath property


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

<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
    <SettingsPlaceholders StartMark="[%" EndMark="%]" />
        <dx:HtmlEditorCssFile FilePath="~/ContentStyles.css" />
        <dx:HtmlEditorPlaceholderItem Value="FirstName" />
        <dx:HtmlEditorPlaceholderItem Value="Date" />
.dxhePlaceholder {
    background-color: yellow;
.dxhePlaceholder:hover {
    background-color: orange;
.dxhePlaceholder.dxheSelected {
    background-color: red !important;
    color: white !important;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e) {
        if (!IsPostBack)
            ASPxHtmlEditor1.Html = File.ReadAllText(Server.MapPath("~/Content.html"));


See Also