public function HTMLRestrictions::extractPlainTagsSubset in Drupal 10
Extracts the subset of plain tags (attributes omitted) from allowed elements.
Return value
\Drupal\ckeditor5\HTMLRestrictions The extracted subset of the given set of HTML restrictions.
File
- core/
modules/ ckeditor5/ src/ HTMLRestrictions.php, line 928
Class
- HTMLRestrictions
- Represents a set of HTML restrictions.
Namespace
Drupal\ckeditor5Code
public function extractPlainTagsSubset() : HTMLRestrictions {
// Ignore the global attribute `*` HTML tag: that is by definition not a
// plain tag.
$plain_tags = array_diff(array_keys($this
->getConcreteSubset()
->getAllowedElements()), [
'*',
]);
return new self(array_fill_keys($plain_tags, FALSE));
}