diff --git a/src/Plugin/CKEditorPlugin/Anchor.php b/src/Plugin/CKEditorPlugin/Anchor.php index eebc4e49e1..3553da5d98 100644 --- a/src/Plugin/CKEditorPlugin/Anchor.php +++ b/src/Plugin/CKEditorPlugin/Anchor.php @@ -23,6 +23,15 @@ public function getFile() { return $this->getLibraryPath() . '/plugin.js'; } + /** + * {@inheritdoc} + */ + public function getDependencies(Editor $editor) { + return [ + 'fakeobjects', + ]; + } + /** * {@inheritdoc} */ @@ -74,7 +83,7 @@ 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/anchor'; + return $originUrl . '/' . $module_path . '/js/anchor'; } } diff --git a/src/Plugin/CKEditorPlugin/Link.php b/src/Plugin/CKEditorPlugin/Link.php index 6cbdf5af61..b6505f0bc3 100644 --- a/src/Plugin/CKEditorPlugin/Link.php +++ b/src/Plugin/CKEditorPlugin/Link.php @@ -81,7 +81,7 @@ 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'; + return $originUrl . '/' . $module_path . '/js/link'; } } diff --git a/src/Plugin/CKEditorPlugin/Unlink.php b/src/Plugin/CKEditorPlugin/Unlink.php index c417250703..51b2803f7e 100644 --- a/src/Plugin/CKEditorPlugin/Unlink.php +++ b/src/Plugin/CKEditorPlugin/Unlink.php @@ -81,7 +81,7 @@ 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/unlink'; + return $originUrl . '/' . $module_path . '/js/unlink'; } }