StyleSensibleElementConstraintValidator::KNOWN_UNSUPPORTED_TAGS

Same name and namespace in other branches
  1. 11.x core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraintValidator.php \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraintValidator::KNOWN_UNSUPPORTED_TAGS
  2. main core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraintValidator.php \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraintValidator::KNOWN_UNSUPPORTED_TAGS

Tags whose plugins are known to not yet integrate with the Style plugin.

To prevent the user from configuring the Style plugin and reasonably expecting it to work correctly for tags of plugins that are known to yet integrate with the Style plugin, generate a validation error for these.

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraintValidator.php, line 36

Class

StyleSensibleElementConstraintValidator
Styles can only be specified for HTML5 tags and extra classes.

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint

Code

protected const KNOWN_UNSUPPORTED_TAGS = [
  // @see https://www.drupal.org/project/drupal/issues/3117172
'<drupal-media>',
  // @see https://github.com/ckeditor/ckeditor5/issues/13778
'<img>',
  // @see https://github.com/ckeditor/ckeditor5/blob/39ad30090ead9dd2d54c3ac53d7f446ade9fd8ce/packages/ckeditor5-html-support/src/schemadefinitions.ts#L12-L50
'<keygen>',
  '<applet>',
  '<basefont>',
  '<isindex>',
  '<hr>',
  '<br>',
  '<area>',
  '<command>',
  '<map>',
  '<wbr>',
  '<colgroup>',
  '<col>',
  '<datalist>',
  '<track>',
  '<source>',
  '<option>',
  '<param>',
  '<optgroup>',
  '<link>',
  '<noscript>',
];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.