Skip to main content

ASPxHtmlEditorHtmlEditingSettings.PasteFiltering Property

Returns settings that relate to content element filtering.

Namespace: DevExpress.Web.ASPxHtmlEditor

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

NuGet Package: DevExpress.Web

Declaration

public HtmlEditorContentElementFiltering PasteFiltering { get; }

Property Value

Type Description
HtmlEditorContentElementFiltering

An object that contains filter settings.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to PasteFiltering
ASP.NET MVC Extensions HtmlEditorBinderSettings
.HtmlEditingSettings .PasteFiltering
HtmlEditorSettings
.SettingsHtmlEditing .PasteFiltering
ASP.NET Web Forms Controls ASPxHtmlEditor
.SettingsHtmlEditing .PasteFiltering

Remarks

ASPxHtmlEditor allows you to filter content elements. Use the PasteFiltering property to specify filter rules for tags, attributes, and style attributes elements in the pasted content. Note that these rules do not affect the existing content. To filter the entire editor’s content automatically, use the HtmlEditorHtmlEditingSettings.ContentElementFiltering property.

Run Demo: HTML Editor - Content Element Filtering

<dx:ASPxHtmlEditor runat="server" ID="ASPxHtmlEditor1">
    <SettingsHtmlEditing>
        <PasteFiltering StyleAttributeFilterMode="BlackList" 
            StyleAttributes="margin, font-family, font-size, line-height, break-after, break-inside" />
    </SettingsHtmlEditing>
</dx:ASPxHtmlEditor>

For more information, see the following topic: Content Element Filtering.

ASPxHtmlEditor removes class names from the pasted content. To keep class names, set the Attributes value to an empty string array:

<dx:ASPxHtmlEditor runat="server" >  
    <SettingsHtmlEditing>  
        <PasteFiltering Attributes="" />  
    </SettingsHtmlEditing>  
</dx:ASPxHtmlEditor>
See Also