You are here

public function SmileyCKEditorButton::getButtons in CKEditor Smiley 8

NOTE: The keys of the returned array corresponds to the CKEditor button names. They are the first argument of the editor.ui.addButton() or editor.ui.addRichCombo() functions in the plugin.js file.

Overrides CKEditorPluginButtonsInterface::getButtons

File

src/Plugin/CKEditorPlugin/SmileyCKEditorButton.php, line 34
Contains \Drupal\ckeditor_smiley\Plugin\CKEditorPlugin\SmileyCKEditorButton.

Class

SmileyCKEditorButton
Defines the "smiley" plugin.

Namespace

Drupal\ckeditor_smiley\Plugin\CKEditorPlugin

Code

public function getButtons() {

  // Make sure that the path to the image matches the file structure of
  // the CKEditor plugin you are implementing.
  return array(
    'Smiley' => array(
      'label' => t('Smiley ckeditor button'),
      'image' => 'libraries/smiley/icons/smiley.png',
    ),
  );
}