You are here

function hook_editor_ckeditor_css_alter in Editor 7

Modify the list of CSS files that will be added to a CKEditor instance.

Modules may use this hook to provide their own custom CSS file without providing a CKEditor plugin. This list of CSS files is only used in the iframe versions of CKEditor.

Note that because this hook is only called for modules and the active theme, front-end themes will not be able to use this hook to add their own CSS files if a different admin theme is active. Instead, front-end themes and base themes may specify CSS files to be used in iframe instances of CKEditor through an entry in their .info file:

editor_ckeditor_stylesheets[] = css / ckeditor - iframe . css;

Parameters

array $css: An array of CSS files, passed by reference. This is a flat list of file paths relative to the Drupal root.

object $format: The corresponding text format object as returned by filter_format_load() for which the current text editor is being displayed.

See also

_ckeditor_theme_css()

1 function implements hook_editor_ckeditor_css_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

editor_ckeditor_editor_ckeditor_css_alter in modules/editor_ckeditor/editor_ckeditor.editor_ckeditor.inc
Implements hook_editor_ckeditor_css_alter().
1 invocation of hook_editor_ckeditor_css_alter()
editor_ckeditor_get_settings in modules/editor_ckeditor/editor_ckeditor.module
Editor JS settings callback; Add CKEditor settings to the page for a format.

File

modules/editor_ckeditor/editor_ckeditor.api.php, line 113
Documentation for Editor CKEditor module APIs.

Code

function hook_editor_ckeditor_css_alter(array &$css, $format) {
  $css[] = drupal_get_path('module', 'mymodule') . '/css/mymodule-ckeditor.css';
}