Configuration Page

CKEditor Allowed Content Rules allows you to override Drupal default "Limit allowed HTML tags and correct faulty HTML" editor rules with more advance CKEditor Allowed Content Rules.

How to use

  1. Navigate to an editor configuration page (/admin/config/content/formats/manage/[editor]).
  2. Ensure you have enabled "Limit allowed HTML tags and correct faulty HTML" filter for this setting to take effect.
  3. On the configuration page, navigate to "CKEditor Allowed Content Rules Override" under "CKEditor plugin settings". Override rules with each item on its own line.

Example configuration

    // A rule accepting <a> only if it contains the "href" attribute.
    a[!href]

    // A rule accepting <img> with a required "src" attribute and an optional
    // "alt" attribute plus optional "width" and "height" styles and an optional 
    // class name.
    img[alt,!src]{width,height}(className)
Supporting organizations: 

Project information

Releases