You are here

interface CKEditorPluginCssInterface in Drupal 10

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

Defines an interface for CKEditor plugins with associated CSS.

This allows a CKEditor plugin to add additional CSS in iframe CKEditor instances without needing to implement hook_ckeditor_css_alter().

Hierarchy

Expanded class hierarchy of CKEditorPluginCssInterface

All classes that implement CKEditorPluginCssInterface

See also

\Drupal\ckeditor\CKEditorPluginInterface

\Drupal\ckeditor\CKEditorPluginButtonsInterface

\Drupal\ckeditor\CKEditorPluginContextualInterface

\Drupal\ckeditor\CKEditorPluginConfigurableInterface

\Drupal\ckeditor\CKEditorPluginBase

\Drupal\ckeditor\CKEditorPluginManager

\Drupal\ckeditor\Annotation\CKEditorPlugin

Plugin API

3 files declare their use of CKEditorPluginCssInterface
DrupalMedia.php in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalMedia.php
Language.php in core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php
LlamaCss.php in core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php

File

core/modules/ckeditor/src/CKEditorPluginCssInterface.php, line 22

Namespace

Drupal\ckeditor
View source
interface CKEditorPluginCssInterface extends CKEditorPluginInterface {

  /**
   * Retrieves enabled plugins' iframe instance CSS files.
   *
   * Note: this does not use a Drupal asset library because this CSS will be
   * loaded by CKEditor, not by Drupal.
   *
   * @param \Drupal\editor\Entity\Editor $editor
   *   A configured text editor object.
   *
   * @return string[]
   *   An array of CSS files. This is a flat list of file paths relative to
   *   the Drupal root.
   */
  public function getCssFiles(Editor $editor);

}

Members