Skip to content
UnicornEditor.php 1.29 KiB
Newer Older
namespace Drupal\editor_test\Plugin\Editor;
 * Defines a Unicorn-powered text editor for Drupal (for testing purposes).
 *   id = "unicorn",
 *   label = @Translation("Unicorn Editor"),
 *   supports_content_filtering = TRUE,
 *   supports_inline_editing = TRUE,
 *   is_xss_safe = FALSE,
 *   supported_element_types = {
 *     "textarea",
 *     "textfield",
 *   }
  function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) {
      '#title' => t('Pony mode'),
      '#type' => 'checkbox',
      '#default_value' => TRUE,
  function getJSSettings(Editor $editor) {
      $js_settings['ponyModeEnabled'] = TRUE;
  public function getLibraries(Editor $editor) {