diff --git a/ckeditor5.libraries.yml b/ckeditor5.libraries.yml index 417d971..467a7d5 100644 --- a/ckeditor5.libraries.yml +++ b/ckeditor5.libraries.yml @@ -17,9 +17,9 @@ drupal.ckeditor5: - core/jquery - core/drupal - core/drupal.debounce - - ckeditor5/ckeditor5.editorClassic - - ckeditor5/ckeditor5.editorDecoupled - - ckeditor5/ckeditor5 + - core/ckeditor5.editorClassic + - core/ckeditor5.editorDecoupled + - core/ckeditor5 - editor/drupal.editor - ckeditor5/drupal.ckeditor5.quickedit-temporary-work-around @@ -112,7 +112,7 @@ admin.heading: theme: css/heading.admin.css: { } dependencies: - - ckeditor5/ckeditor5.internal + - core/ckeditor5.internal admin.horizontalLine: css: diff --git a/ckeditor5.module b/ckeditor5.module index 10699e9..0ac517b 100644 --- a/ckeditor5.module +++ b/ckeditor5.module @@ -321,11 +321,11 @@ function ckeditor5_library_info_alter(&$libraries, $extension) { $libraries['base']['dependencies'][] = 'ckeditor5/ie11.user.warnings'; } - if ($extension === 'ckeditor5') { + if ($extension === 'core') { // Generate libraries for each of the CKEditor 5 translation files so that // the correct translation file can be attached depending on the current // language. - $files = scandir(\Drupal::service('extension.list.module')->getPath('ckeditor5') . '/js/build/translations'); + $files = scandir('core/assets/vendor/ckeditor5/build/translations'); foreach ($files as $file) { if ($file[0] !== '.' && preg_match('/\.js$/', $file)) { $langcode = basename($file, '.js'); @@ -334,7 +334,7 @@ function ckeditor5_library_info_alter(&$libraries, $extension) { 'version' => $libraries['ckeditor5']['version'], 'license' => $libraries['ckeditor5']['license'], 'js' => [ - 'js/build/translations/' . $file => ['preprocess' => FALSE, 'minified' => TRUE], + 'assets/vendor/ckeditor5/build/translations/' . $file => ['preprocess' => FALSE, 'minified' => TRUE], ], ]; } diff --git a/src/Plugin/Editor/CKEditor5.php b/src/Plugin/Editor/CKEditor5.php index 6bf23dd..1c0c38b 100644 --- a/src/Plugin/Editor/CKEditor5.php +++ b/src/Plugin/Editor/CKEditor5.php @@ -840,7 +840,7 @@ class CKEditor5 extends EditorBase implements ContainerFactoryPluginInterface { if (empty($langcodes)) { $langcodes = []; // Collect languages included with CKEditor 5 based on file listing. - $files = scandir($this->moduleHandler->getModule('ckeditor5')->getPath() . '/js/build/translations'); + $files = scandir('core/assets/vendor/ckeditor5/build/translations'); foreach ($files as $file) { if ($file[0] !== '.' && preg_match('/\.js$/', $file)) { $langcode = basename($file, '.js'); diff --git a/tests/modules/ckeditor5_test/ckeditor5_test.libraries.yml b/tests/modules/ckeditor5_test/ckeditor5_test.libraries.yml index 8547f16..c0c6118 100644 --- a/tests/modules/ckeditor5_test/ckeditor5_test.libraries.yml +++ b/tests/modules/ckeditor5_test/ckeditor5_test.libraries.yml @@ -12,4 +12,4 @@ layercake: theme: css/layout.css: {} dependencies: - - ckeditor5/ckeditor5 + - core/ckeditor5