DescriptionListPlugin.php in CKEditor Description List 2.0.x
File
src/Plugin/CKEditorPlugin/DescriptionListPlugin.php
View source
<?php
namespace Drupal\ckeditor_descriptionlist\Plugin\CKEditorPlugin;
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\editor\Entity\Editor;
class DescriptionListPlugin extends CKEditorPluginBase {
public function getDependencies(Editor $editor) {
return [];
}
public function getLibraries(Editor $editor) {
return [];
}
public function getConfig(Editor $editor) {
return [];
}
public function getButtons() {
return [
'DescriptionList' => [
'label' => $this
->t('Tag dl'),
'image' => base_path() . 'libraries/ckeditor-plugin-descriptionlist/icons/descriptionlist.png',
],
'DescriptionTerm' => [
'label' => $this
->t('Tag dd'),
'image' => base_path() . 'libraries/ckeditor-plugin-descriptionlist/icons/descriptionterm.png',
],
'descriptionValue' => [
'label' => $this
->t('Tag dt'),
'image' => base_path() . 'libraries/ckeditor-plugin-descriptionlist/icons/descriptionvalue.png',
],
];
}
public function getFile() {
return 'libraries/ckeditor-plugin-descriptionlist/plugin.js';
}
}