function editor_ckeditor_editor_ckeditor_css_alter in Editor 7
Implements hook_editor_ckeditor_css_alter().
File
- modules/
editor_ckeditor/ editor_ckeditor.editor_ckeditor.inc, line 225 - Editor CKEditor hooks implemented by the Editor CKEditor module.
Code
function editor_ckeditor_editor_ckeditor_css_alter(array &$css, $format) {
// Add the editor caption CSS if the text format associated with this text
// editor uses the editor_caption filter. This is used by the included
// CKEditor DrupalImageCaption plugin.
if (isset($format->filters['editor_caption']) && $format->filters['editor_caption']->status) {
$css[] = drupal_get_path('module', 'editor') . '/css/filter/filter.caption.css';
}
// Add the editor align CSS if the text format associated with this text
// editor uses the editor_align filter. This is used by the included
// CKEditor DrupalImage plugin.
if (isset($format->filters['editor_align']) && $format->filters['editor_align']->status) {
$css[] = drupal_get_path('module', 'editor_ckeditor') . '/css/plugins/drupalimagecaption/editor_ckeditor.drupalimagecaption.css';
}
// @todo: Remove in https://www.drupal.org/node/2645100.
foreach ($format->editor_settings['toolbar'] as $row) {
foreach ($row as $button_group) {
if (in_array('Language', $button_group['items'])) {
$css[] = drupal_get_path('module', 'editor_ckeditor') . '/css/plugins/language/editor_ckeditor.language.css';
}
}
}
}