Editor.php

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

Namespace

Drupal\editor\Attribute

File

core/modules/editor/src/Attribute/Editor.php

View source
<?php

namespace Drupal\editor\Attribute;

use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Defines an Editor attribute object.
 *
 * Plugin Namespace: Plugin\Editor
 *
 * For a working example, see \Drupal\ckeditor5\Plugin\Editor\CKEditor5
 *
 * @see \Drupal\editor\Plugin\EditorPluginInterface
 * @see \Drupal\editor\Plugin\EditorBase
 * @see \Drupal\editor\Plugin\EditorManager
 * @see hook_editor_info_alter()
 * @see plugin_api
 */
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) {
  }

}

Classes

Title Deprecated Summary
Editor Defines an Editor attribute object.

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