function _ckeditor_theme_css in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/ckeditor/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::buildContentsCssJSSetting in core/
modules/ ckeditor/ src/ Plugin/ Editor/ CKEditor.php - Builds the "contentsCss" configuration part of the CKEditor JS settings.
File
- core/
modules/ ckeditor/ ckeditor.module, line 84 - Provides integration with the CKEditor WYSIWYG editor.
Code
function _ckeditor_theme_css($theme = NULL) {
$css = array();
if (!isset($theme)) {
$theme = \Drupal::config('system.theme')
->get('default');
}
if (isset($theme) && ($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(_ckeditor_theme_css($info['base theme']), $css);
}
}
return $css;
}