You are here

interface CKEditorPluginContextualInterface in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/ckeditor/src/CKEditorPluginContextualInterface.php \Drupal\ckeditor\CKEditorPluginContextualInterface
  2. 9 core/modules/ckeditor/src/CKEditorPluginContextualInterface.php \Drupal\ckeditor\CKEditorPluginContextualInterface

Defines an interface for contextually enabled CKEditor plugins.

Contextually enabled CKEditor plugins can be enabled via an explicit setting, or enable themselves based on the configuration of another setting, such as enabling based on a particular button being present in the toolbar.

If a contextually enabled CKEditor plugin must also be configurable (for instance, in the case where it must be enabled based on an explicit setting), then one must also implement the CKEditorPluginConfigurableInterface interface.

Hierarchy

Expanded class hierarchy of CKEditorPluginContextualInterface

All classes that implement CKEditorPluginContextualInterface

See also

\Drupal\ckeditor\CKEditorPluginInterface

\Drupal\ckeditor\CKEditorPluginButtonsInterface

\Drupal\ckeditor\CKEditorPluginConfigurableInterface

\Drupal\ckeditor\CKEditorPluginCssInterface

\Drupal\ckeditor\CKEditorPluginBase

\Drupal\ckeditor\CKEditorPluginManager

\Drupal\ckeditor\Annotation\CKEditorPlugin

Plugin API

5 files declare their use of CKEditorPluginContextualInterface
ckeditor.module in core/modules/ckeditor/ckeditor.module
Provides integration with the CKEditor WYSIWYG editor.
DrupalMedia.php in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalMedia.php
Internal.php in core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php
LlamaContextual.php in core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaContextual.php
LlamaContextualAndButton.php in core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaContextualAndButton.php

File

core/modules/ckeditor/src/CKEditorPluginContextualInterface.php, line 28

Namespace

Drupal\ckeditor
View source
interface CKEditorPluginContextualInterface extends CKEditorPluginInterface {

  /**
   * Checks if this plugin should be enabled based on the editor configuration.
   *
   * The editor's settings can be retrieved via $editor->getSettings().
   *
   * @param \Drupal\editor\Entity\Editor $editor
   *   A configured text editor object.
   *
   * @return bool
   */
  public function isEnabled(Editor $editor);

}

Members