Add the Anchor Link ~3 module and configure the CKEditor 5 Rich editor text format to use it

Created on 3 December 2023, 7 months ago
Updated 12 December 2023, 7 months ago

Problem/Motivation

Anchor Link 3.0.0-alpha1 was released on: 1 Dec 2023 by: Dylan Donkersgoed
https://www.drupal.org/project/anchor_link/releases/3.0.0-alpha1

Thank you, Dylan

Thank you, Northern Commerce
https://github.com/northernco/ckeditor5-anchor-drupal

Proposed resolution

  • Add "drupal/anchor_link": "~3", in the composer.json file.
  • Use the @northernco/ckeditor5-anchor-drupal but require it in Varbase Profile composer by npm-asset/northernco--ckeditor5-anchor-drupal
  • Add a suggestion to add the "npm-asset/northernco--ckeditor5-anchor-drupal": "^0.4.0" library.
  • Change the default config for the Rich editor Text format
  • Add a hook update to enable the Anchor Link module and add the "anchor" command button after the "link" in the Rich Editor toolbar
  • Add Varbase Editor requirements helper function for standard drupal profiles

    Varbase Editor requires the CKEditor5 Anchor Drupal library.

    Download it https://github.com/northernco/ckeditor5-anchor-drupal and place it in the
    libraries folder (/libraries).
    Use the asset-packagist.org method:
    Make sure to change repositories for Drupal and assets:

            "repositories": {
              "drupal": {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
              },
              "assets": {
                "type": "composer",
                "url": "https://asset-packagist.org"
              }
            },
    

    Add the following in the root composer.json for the project

            "installer-paths": {
              "docroot/libraries/ckeditor5-anchor-drupal": ["npm-asset/northernco--ckeditor5-anchor-drupal"],
    

    And

            "drupal-libraries": {
              "library-directory": "docroot/libraries",
              "libraries": [
                {"name": "ckeditor5-anchor-drupal", "package": "npm-asset/northernco--ckeditor5-anchor-drupal"}
              ]
            },
    

    No need to add anything else with Varbase Profile

    If the project is a Standard Drupal profile is using Varbase Editor, you need to add the following too:
    "npm-asset/northernco--ckeditor5-anchor-drupal": "^0.4.0"

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0-rc1 , varbase_editor-10.0.0-rc3

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

After:

Edit an anchor

Testing case of adding a "Got to bottom" to a an anchor link using Linkit

After adding an anchor name "bottom"

Click on the "Link" button in the CKEditor toolbar

Select the "Go to bottom" text in the body of the CKEditor
Add "#bottom" in the Linkit Interface

The Anchor Link can be edited to other links or other anchors

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3405819 : Added the Anchor Link ~3 module and configure the CKEditor 5 Rich editor text format to use it
📌 Task
Status

Fixed

Version

10.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024