While OSU Drupal 7 had a button in the CKEditor to create anchor links, at the time of posting (2024-01-09) CKEditor in OSU Drupal 10 doesn’t currently have a button … yet.
Until there is a button, here’s how to add anchor links manually.
For the text version of this bad advice, I’ll pretend that we have a page for students about the cost of attending OSU. On that page there are several sections designated by h2 headings. I’ll assume one of the headings you’d want to create an anchor link to is “Financial aid”
You’ll need to edit html by hand. Click the “source” button in CKEditor to view the block html.
Preferably in a heading element add id=”financial-aid”
<h2 id="financial-aid">Financial aid</h2>
Then when creating a link on a different part of the page, use #financial-aid as your url.
or if you are linking from somewhere other than your current page, add #your-anchor-text to the end of the url.
For example: https://unit.oregonstate.edu/students/cost#financial-aid
If you are adding a link from a menu bar item to your anchor link, use “#financial-aid” (without quotes) in the url field.
Here’s a wildly entertaining video walkthrough – although it does not include an example of adding a link to a menu bar item.