abstract class CKEditorPluginBase

Defines a base CKEditor plugin implementation.

No other CKEditor plugins can be internal, unless a different CKEditor build than the one provided by Drupal core is used. Most CKEditor plugins don't need to provide additional settings forms.

This base assumes that your plugin has buttons that you want to be enabled through the toolbar builder UI. It is still possible to also implement the CKEditorPluginContextualInterface (for contextual enabling) and CKEditorPluginConfigurableInterface interfaces (for configuring plugin settings) though.

NOTE: the Drupal plugin ID should correspond to the CKEditor plugin name.

Hierarchy

Expanded class hierarchy of CKEditorPluginBase

See also

CKEditorPluginInterface

CKEditorPluginButtonsInterface

CKEditorPluginContextualInterface

CKEditorPluginConfigurableInterface

2 files declare their use of CKEditorPluginBase
Internal.php in drupal/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php
Contains \Drupal\ckeditor\Plugin\CKEditorPlugin\Internal.
StylesCombo.php in drupal/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/StylesCombo.php
Contains \Drupal\ckeditor\Plugin\CKEditorPlugin\StylesCombo.

File

drupal/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginBase.php, line 33
Contains \Drupal\ckeditor\Plugin\CKEditorPluginBase.

Namespace

Drupal\ckeditor
View source
abstract class CKEditorPluginBase extends PluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface {

  /**
   * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::isInternal().
   */
  function isInternal() {
    return FALSE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CKEditorPluginBase::isInternal function Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::isInternal(). Overrides CKEditorPluginInterface::isInternal 2
CKEditorPluginButtonsInterface::getButtons public function Returns the buttons that this plugin provides, along with metadata. 4
CKEditorPluginInterface::getConfig public function Returns the additions to CKEDITOR.config for a specific CKEditor instance. 3
CKEditorPluginInterface::getFile public function Returns the Drupal root-relative file path to the plugin JavaScript file. 3
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition.
PluginBase::$pluginId protected property The plugin_id.
PluginBase::getPluginDefinition public function Returns the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition
PluginBase::getPluginId public function Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::__construct public function Constructs a Drupal\Component\Plugin\PluginBase object. 17