You are here

function hook_codemirror_mode_info_alter in The CodeMirror Editor 8

Alters the list of CodeMirror language modes.

Parameters

array[] $modes: A list of available language modes.

See also

codemirror_editor.codemirror_modes.yml

1 function implements hook_codemirror_mode_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

codemirror_editor_test_codemirror_mode_info_alter in tests/codemirror_editor_test/codemirror_editor_test.module
Implements hook_codemirror_mode_info_alter().
1 invocation of hook_codemirror_mode_info_alter()
CodemirrorModePluginManager::__construct in src/CodemirrorModePluginManager.php
Constructs CodemirrorModePluginManager object.

File

./codemirror_editor.api.php, line 21
Hooks provided by the CodeMirror editor module.

Code

function hook_codemirror_mode_info_alter(array &$modes) {

  // Make sure PHP language mode is always loaded.
  $modes['php']['usage'][] = 'my_module';
}