function _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 drupal/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
Builds the "contentsCss" configuration part of the CKEditor JS settings.

File

drupal/core/modules/ckeditor/ckeditor.module, line 100
Provides integration with the CKEditor WYSIWYG editor.

Code

function _ckeditor_theme_css($theme = NULL) {
  $css = array();
  if (!isset($theme)) {
    $theme = config('system.theme')
      ->get('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(_ckeditor_theme_css($info['base theme'], $css));
    }
  }
  return $css;
}