5 * Definition of \Drupal\ckeditor_widgets\Plugin\CKEditorPlugin\AnchorLink.
7 namespace Drupal\ckeditor_widgets\Plugin\CKEditorPlugin;
9 use Drupal\editor\Entity\Editor;
10 use Drupal\ckeditor\CKEditorPluginBase;
13 * Defines the "widgettemplatemenu" plugin.
16 * id = "widgettemplatemenu",
17 * label = @Translation("CKEditor Template Menu Widgets"),
18 * module = "ckeditor_widgets"
21 class WidgetTemplateMenu extends CKEditorPluginBase {
24 * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile().
27 return drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/plugin.js';
33 public function getDependencies(Editor $editor) {
39 public function getLibraries(Editor $editor) {
46 public function isInternal() {
51 * Implements \Drupal\ckeditor\Plugin\CKEditorPluginButtonsInterface::getButtons().
53 function getButtons() {
56 'label' => $this->t('Insert media'),
57 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/oembed.png',
59 'codeSnippet' => array(
60 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/codesnippet.png',
61 'label' => $this->t('Insert code snippet'),
64 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/leaflet.png',
65 'label' => $this->t('Insert leaflet map'),
67 'FontAwesome' => array(
68 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/fontawesome.png',
69 'label' => $this->t('Insert Font Awesome icon'),
71 'WidgetTemplateMenu' => array(
72 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/icons/widgettemplatemenu.png',
73 'label' => $this->t('Add Template Menu'),
81 public function getConfig(Editor $editor) {