diff --git a/anchor_link.ckeditor5.yml b/anchor_link.ckeditor5.yml new file mode 100644 index 0000000000000000000000000000000000000000..f785aedda1bcc8dcb5aefd0e6cab5364e49c9b36 --- /dev/null +++ b/anchor_link.ckeditor5.yml @@ -0,0 +1,28 @@ +anchor_link_ckeditor5_anchor: + # Use the provider: property for this plugin to depend on another module. + + # Configuration that will be sent to CKEditor 5 JavaScript plugins. + ckeditor5: + plugins: + - anchor.Anchor + # *Additional configuration properties* + # config: data sent to the constructor of any CKEditor 5 plugin + # editorPluginName: + # editorPluginProperty: editorPluginValue + + # Configuration that will be used directly by Drupal. + drupal: + label: Anchor link + library: anchor_link/cke5_anchor_link + # The library loaded when configuring the text format using this plugin. +# admin_library: anchor_link/cke5_anchor_link + toolbar_items: + # This should match the name of the corresponding plugin exported in the + # plugin's index.js. + anchor: + label: Anchor link + elements: + - + - + - + - diff --git a/anchor_link.libraries.yml b/anchor_link.libraries.yml new file mode 100644 index 0000000000000000000000000000000000000000..2792ec218ac713ca24895dfcd9515bc3053c9555 --- /dev/null +++ b/anchor_link.libraries.yml @@ -0,0 +1,13 @@ +drupal.anchor_link: + version: VERSION + css: + theme: + css/anchor_link.css: { every_page: 1 } + dependencies: + - core/drupal + - core/drupalSettings +cke5_anchor_link: + js: + /libraries/ckeditor5-anchor-drupal/build/anchor.js: { preprocess: false, minified: true } + dependencies: + - core/ckeditor5 diff --git a/composer.libraries.json b/composer.libraries.json new file mode 100644 index 0000000000000000000000000000000000000000..7234b978c5dad491b4db1bc28da8ecc83ee764a9 --- /dev/null +++ b/composer.libraries.json @@ -0,0 +1,19 @@ +{ + "repositories": { + "ckeditor5-anchor-drupal": { + "type": "package", + "package": { + "name": "northernco/ckeditor5-anchor-drupal", + "version": "0.1.0.", + "type": "drupal-library", + "dist": { + "url": "https://registry.npmjs.org/@northernco/ckeditor5-anchor-drupal/-/ckeditor5-anchor-drupal-0.1.0.tgz", + "type": "tar" + } + } + } + }, + "require": { + "northernco/ckeditor5-anchor-drupal": "^0.1.0" + } +} diff --git a/src/Plugin/CKEditor4To5Upgrade/Anchor.php b/src/Plugin/CKEditor4To5Upgrade/Anchor.php new file mode 100644 index 0000000000000000000000000000000000000000..bf4356642bfb4930b383be79eb34eabcc929812b --- /dev/null +++ b/src/Plugin/CKEditor4To5Upgrade/Anchor.php @@ -0,0 +1,53 @@ +