class DrupalAspectsOfCKEditor5Plugin

Same name in this branch
  1. 11.x core/modules/ckeditor5/src/Attribute/DrupalAspectsOfCKEditor5Plugin.php \Drupal\ckeditor5\Attribute\DrupalAspectsOfCKEditor5Plugin
Same name and namespace in other branches
  1. 9 core/modules/ckeditor5/src/Annotation/DrupalAspectsOfCKEditor5Plugin.php \Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin
  2. 10 core/modules/ckeditor5/src/Annotation/DrupalAspectsOfCKEditor5Plugin.php \Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin

Defines the "Drupal aspects of a CKEditor5Plugin" annotation object.

Plugin Namespace: Plugin\CKEditor5Plugin.

Hierarchy

Expanded class hierarchy of DrupalAspectsOfCKEditor5Plugin

See also

\Drupal\ckeditor5\Plugin\CKEditorPluginInterface

\Drupal\ckeditor5\Plugin\CKEditorPluginBase

\Drupal\ckeditor5\Plugin\CKEditorPluginManager

Plugin API

\Drupal\ckeditor5\Annotation\CKEditor5Plugin

\Drupal\ckeditor5\Annotation\CKEditor5AspectsOfCKEditor5Plugin

Related topics

1 file declares its use of DrupalAspectsOfCKEditor5Plugin
CKEditor5PluginManagerTest.php in core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php

File

core/modules/ckeditor5/src/Annotation/DrupalAspectsOfCKEditor5Plugin.php, line 24

Namespace

Drupal\ckeditor5\Annotation
View source
class DrupalAspectsOfCKEditor5Plugin extends Plugin {
    
    /**
     * The human-readable name of the CKEditor plugin.
     *
     * @var \Drupal\Core\Annotation\Translation
     * @ingroup plugin_translatable
     */
    public $label;
    
    /**
     * The CKEditor 5 plugin class.
     *
     * If not specified, the CKEditor5PluginDefault class is used.
     *
     * This property is optional and it does not need to be declared.
     *
     * @var string
     */
    public $class = CKEditor5PluginDefault::class;
    
    /**
     * The CKEditor 5 plugin deriver class.
     *
     * This property is optional and it does not need to be declared.
     *
     * @var string|null
     */
    public $deriver = NULL;
    
    /**
     * The library this plugin requires.
     *
     * This property is optional and it does not need to be declared.
     *
     * @var string|false
     */
    public $library = FALSE;
    
    /**
     * The admin library this plugin provides.
     *
     * This property is optional and it does not need to be declared.
     *
     * @var string|false
     */
    public $admin_library = FALSE;
    
    /**
     * List of elements and attributes provided.
     *
     * An array of strings, or false if no elements are provided.
     *
     * Syntax for each array value:
     * - <element> only allows that HTML element with no attributes
     * - <element attrA attrB> only allows that HTML element with attributes attrA
     *   and attrB, and any value for those attributes.
     * - <element attrA="foo bar baz" attrB="qux-*"> only allows that HTML element
     *   with attributes attrA (if attrA contains one of the three listed values)
     *   and attrB (if its value has the provided prefix).
     * - <element data-*> only allows that HTML element with any attribute that
     *   has the given prefix.
     *
     * Note that <element> means such an element (tag) can be created, whereas
     * <element attrA attrB> means that `attrA` and `attrB` can be created on the
     * tag. If a plugin supports both creating the element as well as setting some
     * attributes or attribute values on it, it should have distinct entries in
     * the list.
     * For example, for a link plugin: `<a>` and `<a href>`. The first indicates
     * the plugin can create such tags, the second indicates it can set the `href`
     * attribute on it. If the first were omitted, the Drupal CKEditor 5 module
     * would interpret that as "this plugin cannot create `<a>`, it can only set
     * the `href` attribute on it".
     *
     * @var string[]|false
     *
     * @see \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::getCreatableElements()
     */
    public $elements;
    
    /**
     * List of toolbar items the plugin provides.
     *
     * This property is optional and it does not need to be declared.
     *
     * @var array[]
     */
    public $toolbar_items = [];
    
    /**
     * List of conditions to enable this plugin.
     *
     * This property is optional and it does not need to be declared.
     *
     * @var array|false
     */
    public $conditions = FALSE;

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
DrupalAspectsOfCKEditor5Plugin::$admin_library public property The admin library this plugin provides.
DrupalAspectsOfCKEditor5Plugin::$class public property The CKEditor 5 plugin class.
DrupalAspectsOfCKEditor5Plugin::$conditions public property List of conditions to enable this plugin.
DrupalAspectsOfCKEditor5Plugin::$deriver public property The CKEditor 5 plugin deriver class.
DrupalAspectsOfCKEditor5Plugin::$elements public property List of elements and attributes provided.
DrupalAspectsOfCKEditor5Plugin::$label public property The human-readable name of the CKEditor plugin.
DrupalAspectsOfCKEditor5Plugin::$library public property The library this plugin requires.
DrupalAspectsOfCKEditor5Plugin::$toolbar_items public property List of toolbar items the plugin provides.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 6
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass 1
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider 1
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass 1
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 3

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.