Table of Contents
How to Create an Anchor from a Regular Text to a Regular Text Old Editor 1. Anchor that points to a section of the same article 2. Anchor that points to a specific section of another article New Editor How to create an Anchor from A Regular Text to a ToC ItemHow to Create an Anchor from a Regular Text to a Regular Text
Adding an anchor link that points to a specific section of an article needs some HTML coding, which needs to be done in the Code View in the Old Editor or the Source in the New Editor. If you feel comfortable doing so, please follow the steps below.
Old Editor
1. Anchor that points to a section of the same article
- Check if the target section already has an ID attribute.
- If there's already an ID, just copy it
- If none, add the desired ID (Can be done via Code View ).
- Click Insert Link, and add #+ID to the anchor link.
2. Anchor that points to a specific section of another article
- Check if the target section already has an ID attribute
- If there's already an ID, just copy it
- If there's none, add the desired ID (Can be done via Code View ).
- Click Insert Link, and add /slug-of-the-other-article#id to the anchor link
- You have to update and publish both changes, in both articles, for the anchors to work.
🔥 The ID can be anything you want - the only thing is that you must use that same ID to create the anchor!
🔥 Also, please note that this will not open the accordions/tabs.
New Editor
We recommend that you change the Paragraph setting of the title and set it to any Heading, as you can adjust the formatting of the text. This will automatically create an ID for the title and you will be able to use it to create your anchor link.
So the steps are:
- Set the anchor to Heading 1,2,3 or 4
- Switch to the Source mode and copy the ID of that heading
- Go back to the editor, select the desired text, click Link , and add #anchorIDhere (it's necessary to include #)
How to create an Anchor from A Regular Text to a ToC Item
You can also use headings to create an Anchor to a specific section of your articles!
You just need to go to the end-user view and, once you locate the Table of Contents, right-click the desired heading, copy its link address, go back to the article editor, select the desired text, click insert link, and paste the address.
Here's an example: