class Editor

Same name in this branch
  1. 10 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor
  2. 10 core/modules/editor/src/Annotation/Editor.php \Drupal\editor\Annotation\Editor
Same name and namespace in other branches
  1. 9 core/modules/quickedit/src/Plugin/InPlaceEditor/Editor.php \Drupal\quickedit\Plugin\InPlaceEditor\Editor
  2. 9 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor
  3. 9 core/modules/editor/src/Annotation/Editor.php \Drupal\editor\Annotation\Editor
  4. 9 core/modules/editor/src/Plugin/InPlaceEditor/Editor.php \Drupal\editor\Plugin\InPlaceEditor\Editor
  5. 8.9.x core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor
  6. 8.9.x core/modules/editor/src/Annotation/Editor.php \Drupal\editor\Annotation\Editor
  7. 8.9.x core/modules/editor/src/Plugin/InPlaceEditor/Editor.php \Drupal\editor\Plugin\InPlaceEditor\Editor
  8. 11.x core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor
  9. 11.x core/modules/editor/src/Annotation/Editor.php \Drupal\editor\Annotation\Editor
  10. 11.x core/modules/editor/src/Attribute/Editor.php \Drupal\editor\Attribute\Editor

Defines an Editor attribute object.

Plugin Namespace: Plugin\Editor

For a working example, see \Drupal\ckeditor5\Plugin\Editor\CKEditor5

Hierarchy

  • class \Drupal\editor\Attribute\Editor implements \Drupal\Component\Plugin\Attribute\Plugin

Expanded class hierarchy of Editor

See also

\Drupal\editor\Plugin\EditorPluginInterface

\Drupal\editor\Plugin\EditorBase

\Drupal\editor\Plugin\EditorManager

hook_editor_info_alter()

Plugin API

4 files declare their use of Editor
CKEditor5.php in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
EditorManager.php in core/modules/editor/src/Plugin/EditorManager.php
TRexEditor.php in core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/TRexEditor.php
UnicornEditor.php in core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php
55 string references to 'Editor'
CKEditor5::assessActiveTextEditorAfterBuild in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Form #after_build callback: provides text editor state changes.
CKEditor5::buildConfigurationForm in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Form constructor.
CKEditor5::submitConfigurationForm in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Form submission handler.
CKEditor5::validateConfigurationForm in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Form validation handler.
CKEditor5ImageController::upload in core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
Uploads and saves an image from a CKEditor 5 POST.

... See full list

File

core/modules/editor/src/Attribute/Editor.php, line 21

Namespace

Drupal\editor\Attribute
View source
class Editor extends Plugin {
  
  /**
   * Constructs an Editor object.
   *
   * @param string $id
   *   The plugin ID.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
   *   The human-readable name of the text editor, translated
   * @param bool $supports_content_filtering
   *   Whether the editor supports "allowed content only" filtering.
   * @param bool $supports_inline_editing
   *   Whether the editor supports the inline editing provided by the Edit
   *   module.
   * @param bool $is_xss_safe
   *   Whether this text editor is not vulnerable to XSS attacks.
   * @param string[] $supported_element_types
   *   On which form element #types this text editor is capable of working.
   * @param class-string|null $deriver
   *   (optional) The deriver class.
   */
  public function __construct(public readonly string $id, public readonly TranslatableMarkup $label, public readonly bool $supports_content_filtering, public readonly bool $supports_inline_editing, public readonly bool $is_xss_safe, public readonly array $supported_element_types, public readonly ?string $deriver = NULL) {
  }

}

Members

Title Sort descending Modifiers Object type Summary
Editor::__construct public function Constructs an Editor object.

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