# Advanced Content Filter – Automatic ModeDocumentation

Advanced Content Filter (ACF) is an important CKEditor core feature that filters incoming HTML content by transforming and deleting disallowed elements, attributes, classes and styles. By default it is enabled and works in automatic mode, which means that CKEditor will only accept content that was defined as allowed by enabled CKEditor features (such as plugins or buttons).

ACF is a highly configurable and powerful feature, so extensive documentation is available for it, too. The basics are explained in the Getting Started section of the "CKEditor Developer's Guide" and more advanced information is available in the Deep Dive section.

The following text will be used in each sample to show different filtering options:

A sample heavily formatted text using different fonts and text colors.

## Automatic ACF Mode

In the sample below CKEditor works in automatic ACF mode (default behavior, requires no configuration):

• Underline and color buttons are unavailable and there are no buttons to set font size or family. As a result CKEditor will not accept such content.
• Bold button is enabled, so the bold formatting (provided via the <strong> element) is preserved.

It is possible to allow or disallow additional elements or properties in CKEditor by passing special configuration options: config.extraAllowedContent and config.disallowedContent.

In this example config.extraAllowedContent = 'u;span{color}' has the following consequences:

• <u> element is allowed, so the underlined text is left, even though the Underline button is not available.
• <span style="color:..."> is allowed, so the green text is left untouched.
• Since ACF is still in automatic mode and the font family and size buttons are not available, these text formats are removed again.

## Disabling ACF

Turning ACF off is very simple and requires setting a simple configuration option: config.allowedContent = true. As a consequence, CKEditor will not filter entered content, including during paste operations.

Experiment by pasting content from various sources into the editor below and into the first one (with automatic mode on). Compare the results.