function _ckeditor_theme_css in CKEditor for WYSIWYG Module 8
Same name and namespace in other branches
- 7 ckeditor.module \_ckeditor_theme_css()
Retrieves the default theme's CKEditor stylesheets defined in the .info file.
Themes may specify iFrame-specific CSS files for use with CKEditor by including a "ckeditor_stylesheets" key in the theme .info file.
ckeditor_stylesheets[] = css / ckeditor - iframe . css;
1 call to _ckeditor_theme_css()
- CKEditor::getJSSettings in lib/
Drupal/ ckeditor/ Plugin/ editor/ editor/ CKEditor.php - Implements \Drupal\editor\Plugin\EditorInterface::getJSSettings().
File
- ./
ckeditor.module, line 337 - Provides integration with the CKEditor WYSIWYG editor.
Code
function _ckeditor_theme_css($theme = NULL) {
$css = array();
if (!isset($theme)) {
$theme = variable_get('theme_default');
}
if ($theme_path = drupal_get_path('theme', $theme)) {
$info = system_get_info('theme', $theme);
if (isset($info['ckeditor_stylesheets'])) {
$css = $info['ckeditor_stylesheets'];
foreach ($css as $key => $path) {
$css[$key] = $theme_path . '/' . $path;
}
}
if (isset($info['base theme'])) {
$css = array_merge($css, _ckeditor_theme_css($info['base theme']));
}
}
return $css;
}