Class: FilterStatus

Drupal.FilterStatus(name)

new FilterStatus(name)

Text filter status object. Initialized with the filter ID.

Indicates whether the text filter is currently active (enabled) or not.

Contains a set of HTML rules (Drupal.FilterHTMLRule objects) that describe which HTML tags are allowed or forbidden. They can also describe for a set of tags (or all tags) which attributes, styles and classes are allowed and which are forbidden.

It is necessary to allow for multiple HTML rules per feature, for analogous reasons as Drupal.EditorFeature.

HTML rules must be added with the addHTMLRule() method. A filter that has zero HTML rules does not disallow any HTML.

Parameters:
Name Type Description
name string

The name of the feature.

Source:
See:

Members

active :bool

Type:
  • bool
Source:

name :string

Type:
  • string
Source:

rules :Array.<Drupal.FilterHTMLRule>

Type:
Source:

Methods

addHTMLRule(rule)

Adds a HTML rule to the list of HTML rules for this filter.

Parameters:
Name Type Description
rule Drupal.FilterHTMLRule

A text filter HTML rule.

Source: