public function FontCKEditorButton::getButtons in CKEditor Font Size and Family 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/ FontCKEditorButton.php, line 31  
Class
- FontCKEditorButton
 - Defines the "font" plugin.
 
Namespace
Drupal\ckeditor_font\Plugin\CKEditorPluginCode
public function getButtons() {
  // Make sure that the path to the image matches the file structure of
  // the CKEditor plugin you are implementing.
  $modulePath = drupal_get_path('module', 'ckeditor_font');
  return array(
    'Font' => array(
      'label' => $this
        ->t('Font Families'),
      'image' => $modulePath . '/icons/font.png',
    ),
    'FontSize' => array(
      'label' => $this
        ->t('Font Size'),
      'image' => $modulePath . '/icons/fontsize.png',
    ),
  );
}