public function CKEditor5PluginManagerInterface::getProvidedElements in Drupal 10
Gets all supported elements for the given plugins and text editor.
Parameters
string[] $plugin_ids: (optional) An array of CKEditor 5 plugin IDs. When not set, gets elements for all plugins.
\Drupal\editor\EditorInterface|null $editor: (optional) A configured text editor object using CKEditor 5. When not set, plugins depending on the text editor cannot provide elements.
bool $resolve_wildcards: (optional) Whether to resolve wildcards. Defaults to TRUE. When set to FALSE, the raw allowed elements will be returned (with no processing applied hence no resolved wildcards).
bool $creatable_elements_only: (optional) Whether to retrieve only the creatable elements. Defaults to FALSE.
Return value
array A nested array with a structure as described in \Drupal\filter\Plugin\FilterInterface::getHTMLRestrictions().
Throws
\LogicException Thrown when an invalid CKEditor5PluginElementsSubsetInterface implementation is encountered.
See also
\Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::getCreatableElements()
\Drupal\filter\Plugin\FilterInterface::getHTMLRestrictions()
1 method overrides CKEditor5PluginManagerInterface::getProvidedElements()
- CKEditor5PluginManager::getProvidedElements in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5PluginManager.php - Gets all supported elements for the given plugins and text editor.
File
- core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5PluginManagerInterface.php, line 129
Class
- CKEditor5PluginManagerInterface
- Provides the interface for a plugin manager of CKEditor 5 plugins.
Namespace
Drupal\ckeditor5\PluginCode
public function getProvidedElements(array $plugin_ids = [], EditorInterface $editor = NULL, bool $resolve_wildcards = TRUE, bool $creatable_elements_only = FALSE) : array;