You are here

protected static function CodeMirrorPluginTrait::getDefaultCodeMirrorSettings in The CodeMirror Editor 8

Returns the default settings for CodeMirror plugin.

Return value

array A list of default settings, keyed by the setting name.

2 calls to CodeMirrorPluginTrait::getDefaultCodeMirrorSettings()
CodeMirrorEditor::getDefaultSettings in src/Plugin/Editor/CodeMirrorEditor.php
Returns the default settings for this configurable text editor.
CodeMirrorEditorWidget::defaultSettings in src/Plugin/Field/FieldWidget/CodeMirrorEditorWidget.php
Defines the default settings for this plugin.

File

src/CodeMirrorPluginTrait.php, line 42

Class

CodeMirrorPluginTrait
Provides a helper methods to for CodeMirror plugins.

Namespace

Drupal\codemirror_editor

Code

protected static function getDefaultCodeMirrorSettings() {
  return [
    'mode' => 'text/html',
    'toolbar' => TRUE,
    'buttons' => static::getAvailableButtons(),
    'lineWrapping' => FALSE,
    'lineNumbers' => FALSE,
    'foldGutter' => FALSE,
    'autoCloseTags' => TRUE,
    'styleActiveLine' => FALSE,
  ];
}