public function CKEditor4To5UpgradePluginInterface::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem in Drupal 10
Maps a CKEditor 4 button to the CKEditor 5 equivalent, if it exists.
Generated by inspecting all \Drupal\ckeditor\CKEditorPluginButtonsInterface implementations.
Parameters
string $cke4_button: A valid CKEditor 4 button name.
\Drupal\ckeditor5\HTMLRestrictions $text_format_html_restrictions: The restrictions of the text format, if this upgrade plugin needs to inspect the text format's HTML restrictions to make a decision.
Return value
string[]|null The equivalent CKEditor 5 toolbar items, or NULL if no equivalent exists. In either case, the button names must be added to the annotation.
Throws
\OutOfBoundsException Thrown when this plugin does not know whether an equivalent exists.
See also
\Drupal\ckeditor\CKEditorPluginButtonsInterface
\Drupal\ckeditor5\Annotation\CKEditor4To5Upgrade
File
- core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5UpgradePluginInterface.php, line 42
Class
- CKEditor4To5UpgradePluginInterface
- Defines an interface for CKEditor 4 to 5 upgrade plugins.
Namespace
Drupal\ckeditor5\PluginCode
public function mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem(string $cke4_button, HTMLRestrictions $text_format_html_restrictions) : ?array;