Drupal 8 8.0.2
Constructor for an editor feature HTML rule.
Intended to be used in combination with Drupal.EditorFeature.
A text editor feature rule object describes both:
The structure can be very clearly seen below: there's a "required" and an "allowed" key. For each of those, there are objects with the "tags", "attributes", "styles" and "classes" keys. For all these keys the values are initialized to the empty array. List each possible value as an array value. Besides the "required" and "allowed" keys, there's an optional "raw" key: it allows text editor implementations to optionally pass in their raw representation instead of the Drupal-defined representation for HTML rules.
tags: [''] attributes: ['href', 'alt'] styles: ['color', 'text-decoration'] classes: ['external', 'internal']