function CKEditor::getDefaultSettings

Same name and namespace in other branches
  1. 8.9.x core/modules/ckeditor/src/Plugin/Editor/CKEditor.php \Drupal\ckeditor\Plugin\Editor\CKEditor::getDefaultSettings()

Overrides EditorBase::getDefaultSettings

File

core/modules/ckeditor/src/Plugin/Editor/CKEditor.php, line 148

Class

CKEditor
Defines a CKEditor-based text editor for Drupal.

Namespace

Drupal\ckeditor\Plugin\Editor

Code

public function getDefaultSettings() {
  return [
    'toolbar' => [
      'rows' => [
        // Button groups.
[
          [
            'name' => $this->t('Formatting'),
            'items' => [
              'Bold',
              'Italic',
            ],
          ],
          [
            'name' => $this->t('Links'),
            'items' => [
              'DrupalLink',
              'DrupalUnlink',
            ],
          ],
          [
            'name' => $this->t('Lists'),
            'items' => [
              'BulletedList',
              'NumberedList',
            ],
          ],
          [
            'name' => $this->t('Media'),
            'items' => [
              'Blockquote',
              'DrupalImage',
            ],
          ],
          [
            'name' => $this->t('Tools'),
            'items' => [
              'Source',
            ],
          ],
        ],
      ],
    ],
    'plugins' => [],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.