You are here

SplitText.php in Paragraphs Features 8

Same filename and directory in other branches
  1. 2.x src/Plugin/CKEditorPlugin/SplitText.php

File

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

namespace Drupal\paragraphs_features\Plugin\CKEditorPlugin;

use Drupal\Core\Plugin\PluginBase;
use Drupal\ckeditor\CKEditorPluginInterface;
use Drupal\ckeditor\CKEditorPluginContextualInterface;
use Drupal\editor\Entity\Editor;

/**
 * Defines the "splittext" plugin.
 *
 * @CKEditorPlugin(
 *   id = "splittext",
 *   label = @Translation("Split text")
 * )
 */
class SplitText extends PluginBase implements CKEditorPluginInterface, CKEditorPluginContextualInterface {

  /**
   * {@inheritdoc}
   */
  public function isInternal() {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function getDependencies(Editor $editor) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getLibraries(Editor $editor) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function isEnabled(Editor $editor) {
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function getFile() {
    return drupal_get_path('module', 'paragraphs_features') . '/js/plugins/splittext/plugin.js';
  }

  /**
   * {@inheritdoc}
   */
  public function getConfig(Editor $editor) {
    return [];
  }

}

Classes

Namesort descending Description
SplitText Defines the "splittext" plugin.