Nbsp.php in CKEditor Non-breaking space Plugin ( ) 8.2
File
src/Plugin/CKEditorPlugin/Nbsp.php
View source
<?php
namespace Drupal\nbsp\Plugin\CKEditorPlugin;
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\editor\Entity\Editor;
use Drupal\ckeditor\CKEditorPluginInterface;
use Drupal\ckeditor\CKEditorPluginButtonsInterface;
class Nbsp extends CKEditorPluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface {
public function getDependencies(Editor $editor) {
return [];
}
public function isInternal() {
return FALSE;
}
public function getConfig(Editor $editor) {
return [];
}
public function getFile() {
return drupal_get_path('module', 'nbsp') . '/plugins/' . $this
->getPluginId() . '/plugin.js';
}
public function getButtons() {
return [
'DrupalNbsp' => [
'label' => $this
->t('Non-breaking space'),
'image' => drupal_get_path('module', 'nbsp') . '/plugins/' . $this
->getPluginId() . '/icons/' . $this
->getPluginId() . '.png',
],
];
}
}
Classes
Name |
Description |
Nbsp |
Defines the "NBSP" plugin. |