The Drupal Core CKEditor is missing some very important options.
Anchor Link!!!!
This plugin module adds the anchor related features to CKEditor in Drupal 9/10.
Features
- Dialog to insert links and anchors with some properties.
- Context menu option to edit or remove links and anchors.
- Ability to insert a link with the URL using multiple protocols, including an external file if a file manager is integrated.
Requirements
OPTION #1: Use
"drupal/anchor_link": "^3"
: CKEditor 5 version, requires external library.
This plugin uses an external CKEditor5 library: Anchor Link CKEditor plugin
The library can be managed via composer, but you must require wikimedia/composer-merge-plugin:
composer require wikimedia/composer-merge-plugin
and expand the extra section of your composer.json like so (you may need to adjust the "include" directory, e.g. your web files may start with docroot instead of web in which case it would start with docroot/modules):
"extra": { "merge-plugin": { "include": [ "web/modules/contrib/anchor_link/composer.libraries.json" ] } }
then, you can require the library like:
composer require drupal/anchor_link:^3.0
In some cases you may need to run the above command twice so that the merge plugin picks up the library after the library information from the module is added.
Other older CKEditor 4 supported options
Recommended to use the CKEditor 5 supported version
OPTION #2: Use "drupal/anchor_link": "~2"
: Manage libraries in your project.
Anchor Link CKEditor plugin
and Fake Objects CKEditor plugin
- CKEditor
- CKEditor FakeObjects module.
- CKEditor Anchor link plugin library. locate it in /libraries/link directory
- CKEditor Fake Objects plugin library. locate it in /libraries/fakeobjects directory, which managed by the CKEditor fakeobjects module.
OPTION #3: Use "drupal/anchor_link": "~1"
: Needed libraries are in the module.
They had been listed in the Drupal.org Library Packaging Allowlist
Issue #3262074: Removed the Double Click event from the Anchor Link plugin, not to conflict the double click event with Drupal Core Link or the Linkit module
This module is sponsored and developed by Vardot.
Project information
- Module categories: Content Editing Experience, Developer Tools, Integrations
- Ecosystem: Varbase - The Ultimate Drupal CMS Starter Kit (Bootstrap Ready)
- 25,511 sites report using this module
- Created by Mohammed J. Razem on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 3.0.x-dev updated 20 Dec 2023 at 17:25 UTC
Works with CKEditor: 4
Development version: 8.x-2.x-dev updated 26 Jan 2023 at 20:29 UTC
Works with CKEditor: 4
Development version: 8.x-1.x-dev updated 12 Jan 2023 at 15:15 UTC