You are here

function _tinymce_theme_css in TinyMCE 7

Retrieves the default theme's TinyMCE stylesheets defined in the .info file.

Themes may specify iframe-specific CSS files for use with TinyMCE by including a "tinymce_stylesheets" key in the theme .info file.

tinymce_stylesheets[] = css / tinymce - iframe . css;
1 call to _tinymce_theme_css()
tinymce_add_settings in ./tinymce.module
Editor JS settings callback; Add Aloha settings to the page for a format.

File

./tinymce.module, line 693

Code

function _tinymce_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['tinymce_stylesheets'])) {
      $css = $info['tinymce_stylesheets'];
      foreach ($css as $key => $path) {
        $css[$key] = $theme_path . '/' . $path;
      }
    }
    if (isset($info['base theme'])) {
      $css = array_merge($css, _tinymce_theme_css($info['base theme']));
    }
  }
  return $css;
}