How to add anchor links in CKEditor 5
  At the moment, CKEditor 5 in Drupal doesn’t include a built-in “anchor” button, but you can create anchor links manually using a simple workaround.
Step-by-Step: Create an Anchor Link
- Type your heading or section title — for example:
Bookmark 1 - Place your cursor right after the heading (you can add a single space after it).
 - Select the space and click the Link button in the toolbar.
 - In the Link URL field, enter:
#bookmark1 - Expand the Advanced settings (▼) and set the ID field to match your anchor name:
bookmark1 - Click the checkmark to save the link.
 
Your link and section will now work together — the link “#bookmark1” will jump to the section where the element has the ID “bookmark1”.
Example
If you create three links at the top of your page:
Bookmark 1 | Bookmark 2 | Bookmark 3…and assign corresponding IDs (bookmark1, bookmark2, bookmark3) to your section headers, clicking a link will smoothly jump to that section within the same page.