You are here

function wysiwyg_get_css in Wysiwyg 5

Same name and namespace in other branches
  1. 5.2 wysiwyg.module \wysiwyg_get_css()
  2. 6.2 wysiwyg.module \wysiwyg_get_css()
  3. 6 wysiwyg.module \wysiwyg_get_css()
  4. 7.2 wysiwyg.module \wysiwyg_get_css()

Retrieve stylesheets for HTML/IFRAME-based editors.

This assumes that the content editing area only needs stylesheets defined for the scope 'theme'.

Return value

An array containing CSS files, including proper base path.

2 calls to wysiwyg_get_css()
wysiwyg_fckeditor_settings in editors/fckeditor.inc
Return runtime editor settings for a given wysiwyg profile.
wysiwyg_tinymce_settings in editors/tinymce.inc
Return runtime editor settings for a given wysiwyg profile.

File

./wysiwyg.module, line 464
Integrate client-side editors with Drupal.

Code

function wysiwyg_get_css() {
  static $files;
  if (isset($files)) {
    return $files;
  }

  // In node form previews, the theme has not been initialized yet.
  init_theme();
  $files = array();
  foreach (drupal_add_css() as $media => $css) {
    if ($media != 'print') {
      foreach ($css['theme'] as $filepath => $preprocess) {
        $files[] = base_path() . $filepath;
      }
    }
  }
  return $files;
}