Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Collapse]HTML Editor
    Deployment of ASPxHtmlEditor
    Main Features
    Getting Started
    ASPxHtmlEditor Designer
   [Collapse]Concepts
    [Expand]View Modes
    [Expand]Get and Set HTML
    [Expand]Toolbars
    [Expand]Dialogs
     Context Menu
     Placeholders
    [Collapse]Content Filtering and Validation
     [Expand]HTML Validation
      Content Element Filtering
      Paste Formatting
      Content Validation
    [Expand]Layout
     Searching Content
     Client-Side Commands
     Keyboard Shortcuts
     Import and Export
     Support for SharePoint
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Content Element Filtering

The ASPxHtmlEditor provides you with the ability to automatically filter content elements. You can specify filter rules for the following elements: tags, attributes, and style attributes.

For every element type, the ASPxHtmlEditor control provides a property listing filtered elements and a property specifying the filter mode.

The filter mode properties can be set to one of the following values.

  • WhiteList - the specified elements are allowed and will be maintained; other elements will be removed.
  • BlackList - the specified elements are prohibited and will be removed; other elements will be maintained.

Expanded Example

This code sample demonstrates how to specify the following content element filtering settings.

  • All cellspacing and cellpadding attributes should be removed from the editor content.
  • All tags with the exception of specified ones (a, p, span, img, ul, li, table, tr, td) should be removed from the editor content.

View the Demo

To see this feature in action, please refer to the following online demo: Content Element Filtering

How would you rate this topic?​​​​​​​