ContentsPlugin.php in CKEditor Table of Contents 8
File
src/Plugin/CKEditorPlugin/ContentsPlugin.php
View source
<?php
namespace Drupal\ckeditor_contents\Plugin\CKEditorPlugin;
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\editor\Entity\Editor;
class ContentsPlugin extends CKEditorPluginBase {
public function getButtons() {
return [
'Contents' => [
'label' => $this
->t('Add Table of Contents'),
'image' => 'libraries/contents/icons/contents.png',
],
];
}
public function getFile() {
return 'libraries/contents/plugin.js';
}
public function isInternal() {
return FALSE;
}
public function getDependencies(Editor $editor) {
return [];
}
public function getLibraries(Editor $editor) {
return [];
}
public function getConfig(Editor $editor) {
return [];
}
}