W3cubDocs

/Drupal 8

function ckeditor_library_info_alter

ckeditor_library_info_alter(&$libraries, $extension)

Implements hook_library_info_alter().

File

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

Code

function ckeditor_library_info_alter(&$libraries, $extension) {
  // Pass Drupal's JS cache-busting string via settings along to CKEditor.
  // @see http://docs.ckeditor.com/#!/api/CKEDITOR-property-timestamp
  if ($extension === 'ckeditor' && isset($libraries['drupal.ckeditor'])) {
    $query_string = \Drupal::state()->get('system.css_js_query_string') ? : '0';
    $libraries['drupal.ckeditor']['drupalSettings']['ckeditor']['timestamp'] = $query_string;
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!ckeditor!ckeditor.module/function/ckeditor_library_info_alter/8.1.x