You are here

n1ed.php in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8

Same filename and directory in other branches
  1. 8.2 src/Plugin/CKEditorPlugin/N1ED.php

File

src/Plugin/CKEditorPlugin/n1ed.php
View source
<?php

namespace Drupal\n1ed\Plugin\CKEditorPlugin;

use Drupal\n1ed\Plugin\N1EDEcosystemCKEditorPlugin;

/**
 * Defines plugin.
 *
 * @CKEditorPlugin(
 *   id = "N1ED",
 *   label = @Translation("N1ED"),
 *   module = "n1ed"
 * )
 */
class n1ed extends N1EDEcosystemCKEditorPlugin {

  /**
   * {@inheritdoc}
   */
  public function getPluginName() {
    return "N1ED";
  }

  /**
   * {@inheritdoc}
   */
  public function getModuleName() {
    return "n1ed";
  }

  /**
   * {@inheritdoc}
   */
  public function getButtonsDef() {
    return array(
      'HTML' => array(
        'label' => 'HTML source for N1ED',
        'image' => 'https://cdn.n1ed.com/cdn/buttons/HTML.png',
      ),
    );
  }
  public function addControlsToForm(&$form, $editor, $config) {
    $this
      ->addBooleanToForm($form, $config, "enableN1ED", true);
    $this
      ->addJsonToForm($form, $config, "ui", "");
    $this
      ->addJsonToForm($form, $config, "preview", "");
    $this
      ->addJsonToForm($form, $config, "include", "");
    $this
      ->addJsonToForm($form, $config, "widgetList", "");
    $this
      ->addJsonToForm($form, $config, "widgets", "");
  }

}

Classes

Namesort descending Description
n1ed Defines plugin.