diff core/modules/ckeditor/src/CKEditorPluginCssInterface.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/modules/ckeditor/src/CKEditorPluginCssInterface.php	Thu Jul 05 14:24:15 2018 +0000
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\ckeditor;
+
+use Drupal\editor\Entity\Editor;
+
+/**
+ * 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().
+ *
+ * @see \Drupal\ckeditor\CKEditorPluginInterface
+ * @see \Drupal\ckeditor\CKEditorPluginButtonsInterface
+ * @see \Drupal\ckeditor\CKEditorPluginContextualInterface
+ * @see \Drupal\ckeditor\CKEditorPluginConfigurableInterface
+ * @see \Drupal\ckeditor\CKEditorPluginBase
+ * @see \Drupal\ckeditor\CKEditorPluginManager
+ * @see \Drupal\ckeditor\Annotation\CKEditorPlugin
+ * @see plugin_api
+ */
+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);
+
+}