You are here

public function HTMLRestrictions::getPlainTagsSubset in Drupal 10

Gets the subset of plain tags (no attributes) from allowed elements.

Return value

\Drupal\ckeditor5\HTMLRestrictions The subset of the given set of HTML restrictions.

File

core/modules/ckeditor5/src/HTMLRestrictions.php, line 914

Class

HTMLRestrictions
Represents a set of HTML restrictions.

Namespace

Drupal\ckeditor5

Code

public function getPlainTagsSubset() : HTMLRestrictions {

  // This implicitly excludes wildcard tags and the global attribute `*` tag
  // because they always have attributes specified.
  return new self(array_filter($this->elements, function ($value) {
    return $value === FALSE;
  }));
}