ckeditor_codemirror.module in CKEditor CodeMirror 8
Same filename and directory in other branches
Main code for CKEditor CodeMirror module.
File
ckeditor_codemirror.moduleView source
<?php
/**
* @file
* Main code for CKEditor CodeMirror module.
*/
/**
* Gets the path of a CKEditor CodeMirror library.
*
* @return bool|string
* The path to the specified library or FALSE if the library wasn't found.
*/
function _ckeditor_codemirror_get_library_path() {
$library_names = [
// README.txt say to use 'ckeditor_codemirror'.
'ckeditor_codemirror',
// Old README.txt used 'ckeditor-codemirror'.
'ckeditor-codemirror',
// The Webform module is using 'ckeditor.codemirror'.
'ckeditor.codemirror',
];
foreach ($library_names as $library_name) {
if (file_exists('libraries/' . $library_name)) {
return 'libraries/' . $library_name;
}
}
return FALSE;
}
Functions
Name | Description |
---|---|
_ckeditor_codemirror_get_library_path | Gets the path of a CKEditor CodeMirror library. |