You are here

public function CKEditor::getDefaultSettings in Drupal 10

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

File

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

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' => [],
  ];
}