You are here

protected function Link::getLibraryUrl in CKEditor Anchor Link - For Drupal 8 and 9 3.0.x

Get the CKEditor Link library URL.

1 call to Link::getLibraryUrl()
Link::getButtons in src/Plugin/CKEditorPlugin/Link.php
Returns the buttons that this plugin provides, along with metadata.

File

src/Plugin/CKEditorPlugin/Link.php, line 79

Class

Link
Defines the "link" plugin.

Namespace

Drupal\anchor_link\Plugin\CKEditorPlugin

Code

protected function getLibraryUrl() {
  $originUrl = \Drupal::request()
    ->getSchemeAndHttpHost() . \Drupal::request()
    ->getBaseUrl();
  $module_path = \Drupal::service('module_handler')
    ->getModule('anchor_link')
    ->getPath();
  return $originUrl . $module_path . '/js/link';
}