Report an issue
Class

CKEDITOR.htmlParser.filterRulesGroup

class

Class grouping filter rules for one subject (like element or attribute names).

Filtering

Properties

  • readonly

    rules : Object[]

    Array of objects containing rule, priority and options.

    Defaults to []

Methods

  • add( rule, priority, options )

    Adds specified rule to this group.

    Parameters

    rule : Function | Array

    Function for function based rule or [ pattern, replacement ] array for rule applicable to names.

    priority : Number
    options : Object
  • addMany( rules, priority, options )

    Adds specified rules to this group.

    Parameters

    rules : Array

    Array of rules - see add.

    priority : Number
    options : Object
  • exec( currentValue ) → node | fragment | String

    Executes this rules group on given value. Applicable only if function based rules were added.

    All arguments passed to this function will be forwarded to rules' functions.

    Parameters

    currentValue : node | fragment | String

    The value to be filtered.

    Returns

    node | fragment | String

    Filtered value.

  • execOnName( currentName ) → String

    Executes this rules group on name. Applicable only if filter rules for names were added.

    Parameters

    currentName : String

    The name to be filtered.

    Returns

    String

    Filtered name.

  • findIndex( priority ) → Number

    Finds an index at which rule with given priority should be inserted.

    Parameters

    priority : Number

    Returns

    Number

    Index.