You are here

function ckeditorheight_page_attachments in CKEditorHeight 8

Implements hook_page_attachments().

File

./ckeditorheight.module, line 22
ckeditorheight.module

Code

function ckeditorheight_page_attachments(array &$attachments) {
  $config = \Drupal::config('ckeditorheight.settings');
  $attachments['#attached']['drupalSettings']['ckeditorheight'] = [
    'offset' => $config
      ->get('offset'),
    'line_height' => $config
      ->get('line_height'),
    'unit' => $config
      ->get('unit'),
    'disable_autogrow' => $config
      ->get('disable_autogrow'),
  ];
}