- Issue created by @kopeboy
- 🇪🇨Ecuador jwilson3
Follow. Hash or, you know, an actual Anchor, arrr matey.
- 🇯🇴Jordan Rajab Natshah Jordan
Nice idea Lorenzo!
Yah, I like this to be as an optional filter/option in the selected text format. - 🇪🇨Ecuador jwilson3
The problem I can foresee is training non-technical users to understand the difference of when and when not to enter the hash when creating anchors, and links to the anchors. Technically this is already an issue, but would be exacerbated by the new Hash icon in some ways.
Think of the common use case of creating a Table of Contents with URL fragment links to anchors down the page on a really long page.
Users will need to grok this:
- when you create an anchor you'd click the # icon, and NOT ENTER a # inside the popup.
- when you create a link to an anchor you'd click the 🔗 icon and ENTER a # plus the anchor name inside the popup.
The fix would be to improve the UX in the popup itself, to include the hash sign before the input field, so users get trained not to enter it manually on the anchors.
- 🇺🇸United States justcaldwell Austin, Texas
I really liked the hash idea, but I love both the anchor (seems so obvious it's perfect) and adding the hash to the input. Nice, @jwilson3!
Agree with #3 that it probably needs to be an option to avoid changing existing installs. Maybe just an option to provide a path to an alternative icon file?
- Status changed to Needs work
15 days ago 12:42am 27 June 2025 - 🇮🇹Italy kopeboy Milan
We could add some help text for non-technical users.. but honestly, I recently found these to be superior UX options:
- For generic/manual anchor links:
ckeditor5_plugin_pack_bookmark
(part ofckeditor5_plugin_pack
), because as soon as you create the anchor (they call it "Bookmark", with corresponding icon), it becomes available in the original linking UI. Also note that it creates only the id, without wrapping the text in thea
tag like this module, which creates the illusion of a link in the resulting text (but that doesn't work by clicking because it has no href). - For the table of contents:
toc_filter
(which depends ontoc_api
), because it automatizes the anchor creation (only on headings though), while being very configurable.
- For generic/manual anchor links:
- 🇯🇴Jordan Rajab Natshah Jordan
Not planning to implement this at this time.
Thanks for suggesting and following up.Some other CKEditor 5 filters can manage with
#
Both Bookmarks and Anchor links are important
- Bookmarks ( Visuale marked anchors - With UI indicator at the final front-end )
- Anchor Link ( Hidden anchors - No UI indicator at the final front-end )
Moving to use both in our products.
Hoping that Drupal CMS and Drupal Core add the default Anchor button to CKEditor 5.