aspnet-devexpress-dot-web-dot-aspxhtmleditor-1387fca1.md
Represents a link to the CSS file.
Namespace : DevExpress.Web.ASPxHtmlEditor
Assembly : DevExpress.Web.ASPxHtmlEditor.v25.2.dll
NuGet Package : DevExpress.Web
public class HtmlEditorCssFile :
CollectionItem
Public Class HtmlEditorCssFile
Inherits CollectionItem
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="%]" />
<CssFiles>
<dx:HtmlEditorCssFile FilePath="~/ContentStyles.css" />
</CssFiles>
<Placeholders>
<dx:HtmlEditorPlaceholderItem Value="FirstName" />
<dx:HtmlEditorPlaceholderItem Value="Date" />
</Placeholders>
</dx:ASPxHtmlEditor>
.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"));
}
}
Imports System
Imports System.Collections.Generic
Imports System.IO
Imports System.Linq
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
ASPxHtmlEditor1.Html = File.ReadAllText(Server.MapPath("~/Content.html"))
End If
End Sub
End Class
Object StateManager CollectionItem HtmlEditorCssFile
See Also