HtmlEditorCssFile Class
Represents a link to the CSS file.
Namespace: DevExpress.Web.ASPxHtmlEditor
Assembly: DevExpress.Web.ASPxHtmlEditor.v24.2.dll
Declaration
Related API Members
The following members return HtmlEditorCssFile objects:
Remarks
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
Example
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"));
}
}
Inheritance
Object
StateManager
CollectionItem
HtmlEditorCssFile
See Also