From 4c790357b04e5e48220e78f0bd4d8f5ae259e0af Mon Sep 17 00:00:00 2001 From: Lily Yan <lily.yan@uwaterloo.ca> Date: Thu, 7 Jan 2021 15:51:23 -0500 Subject: [PATCH] ISTWCMS-4210 Add clipboard plugin --- src/Plugin/CKEditorPlugin/ClipboardPlugin.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/Plugin/CKEditorPlugin/ClipboardPlugin.php diff --git a/src/Plugin/CKEditorPlugin/ClipboardPlugin.php b/src/Plugin/CKEditorPlugin/ClipboardPlugin.php new file mode 100644 index 00000000..ac7fee2b --- /dev/null +++ b/src/Plugin/CKEditorPlugin/ClipboardPlugin.php @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\uw_cfg_common\Plugin\CKEditorPlugin; + +use Drupal\ckeditor\CKEditorPluginBase; +use Drupal\editor\Entity\Editor; + +/** + * Defines the "clipboard" plugin. + * + * @CKEditorPlugin( + * id = "clipboard", + * label = @Translation("Clipboard") + * ) + */ +class ClipboardPlugin extends CKEditorPluginBase { + + /** + * {@inheritdoc} + */ + public function getConfig(Editor $editor) { + return []; + } + + /** + * {@inheritdoc} + */ + public function getButtons() { + return []; + } + + /** + * {@inheritdoc} + */ + public function getFile() { + return drupal_get_path('profile', 'uw_base_profile') . '/libraries/ckeditor-clipboard/plugin.js'; + } + +} -- GitLab