function CodeBlock::defaultConfiguration

Same name and namespace in other branches
  1. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/CodeBlock.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\CodeBlock::defaultConfiguration()

File

core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/CodeBlock.php, line 106

Class

CodeBlock
CKEditor 5 Code Block plugin configuration.

Namespace

Drupal\ckeditor5\Plugin\CKEditor5Plugin

Code

public function defaultConfiguration() {
  return [
    'languages' => [
      [
        'language' => 'plaintext',
        'label' => 'Plain text',
      ],
      [
        'language' => 'c',
        'label' => 'C',
      ],
      [
        'language' => 'cs',
        'label' => 'C#',
      ],
      [
        'language' => 'cpp',
        'label' => 'C++',
      ],
      [
        'language' => 'css',
        'label' => 'CSS',
      ],
      [
        'language' => 'diff',
        'label' => 'Diff',
      ],
      [
        'language' => 'html',
        'label' => 'HTML',
      ],
      [
        'language' => 'java',
        'label' => 'Java',
      ],
      [
        'language' => 'javascript',
        'label' => 'JavaScript',
      ],
      [
        'language' => 'php',
        'label' => 'PHP',
      ],
      [
        'language' => 'python',
        'label' => 'Python',
      ],
      [
        'language' => 'ruby',
        'label' => 'Ruby',
      ],
      [
        'language' => 'typescript',
        'label' => 'TypeScript',
      ],
      [
        'language' => 'xml',
        'label' => 'XML',
      ],
    ],
  ];
}

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