You are here

public function CKEditor::getDefaultSettings in Drupal 9

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

Returns the default settings for this configurable text editor.

Return value

array An array of settings as they would be stored by a configured text editor entity (\Drupal\editor\Entity\Editor).

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