ckeditor_ckeditor_css_alter

ckeditor_ckeditor_css_alter(array &$css, Editor $editor)

Implements hook_ckeditor_css_alter().

File

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

Code

1
2
3
4
5
6
7
8
9
10
11
12
function ckeditor_ckeditor_css_alter(array &$css, Editor $editor) {
  if (!$editor->hasAssociatedFilterFormat()) {
    return;
  }
 
  // Add the filter caption CSS if the text format associated with this text
  // editor uses the filter_caption filter. This is used by the included
  // CKEditor DrupalImageCaption plugin.
  if ($editor->getFilterFormat()->filters('filter_caption')->status) {
    $css[] = drupal_get_path('module', 'filter') . '/css/filter.caption.css';
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.