3 namespace Drupal\ckeditor\Plugin\CKEditorPlugin;
5 use Drupal\ckeditor\CKEditorPluginBase;
6 use Drupal\editor\Entity\Editor;
9 * Defines the "drupallink" plugin.
13 * label = @Translation("Drupal link"),
17 class DrupalLink extends CKEditorPluginBase {
22 public function getFile() {
23 return drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink/plugin.js';
29 public function getLibraries(Editor $editor) {
38 public function getConfig(Editor $editor) {
40 'drupalLink_dialogTitleAdd' => $this->t('Add Link'),
41 'drupalLink_dialogTitleEdit' => $this->t('Edit Link'),
48 public function getButtons() {
49 $path = drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink';
52 'label' => $this->t('Link'),
53 'image' => $path . '/icons/drupallink.png',
56 'label' => $this->t('Unlink'),
57 'image' => $path . '/icons/drupalunlink.png',