class Contrib in Drupal 10
Provides the CKEditor 4 to 5 upgrade path for contrib plugins now in core.
@CKEditor4To5Upgrade( id = "contrib", cke4_buttons = { "Code" }, cke4_plugin_settings = { }, cke5_plugin_elements_subset_configuration = { } )
@internal Plugin classes are internal.
Hierarchy
- class \Drupal\ckeditor5\Plugin\CKEditor4To5Upgrade\Contrib extends \Drupal\Core\Plugin\PluginBase implements \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface
Expanded class hierarchy of Contrib
File
- core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5Upgrade/ Contrib.php, line 29
Namespace
Drupal\ckeditor5\Plugin\CKEditor4To5UpgradeView source
class Contrib extends PluginBase implements CKEditor4To5UpgradePluginInterface {
/**
* {@inheritdoc}
*/
public function mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem(string $cke4_button, HTMLRestrictions $text_format_html_restrictions) : ?array {
switch ($cke4_button) {
// @see https://www.drupal.org/project/codetag
case 'Code':
return [
'code',
];
default:
throw new \OutOfBoundsException();
}
}
/**
* {@inheritdoc}
*/
public function mapCKEditor4SettingsToCKEditor5Configuration(string $cke4_plugin_id, array $cke4_plugin_settings) : ?array {
throw new \OutOfBoundsException();
}
/**
* {@inheritdoc}
*/
public function computeCKEditor5PluginSubsetConfiguration(string $cke5_plugin_id, FilterFormatInterface $text_format) : ?array {
throw new \OutOfBoundsException();
}
}