You are here

function anchor_link_page_attachments in CKEditor Anchor Link - For Drupal 8 and 9 8

Implements hook_page_attachments().

File

./anchor_link.module, line 44
Contains anchor_link.module.

Code

function anchor_link_page_attachments(array &$attachments) {
  if (\Drupal::currentUser()
    ->isAuthenticated()) {
    $attachments['#attached']['library'][] = 'anchor_link/drupal.anchor_link';
  }
}