Webflow sync, pageviews & more.
NEW
Answers

How can I add anchor points within the CMS rich text in Webflow?

Currently, Webflow does not provide a built-in feature to add anchor points directly within the CMS rich text field. However, there are workarounds you can use to achieve this functionality.

Option 1: Using the Embed element
1. Add an Embed element (or an HTML embed code widget) to the desired location within the rich text field.
2. Inside the Embed element, insert the HTML code for creating an anchor point. For example: ``.
3. Style the anchor point as desired using custom CSS styles within the Embed element.

Option 2: Using the Paragraph element
1. In the CMS collection template, add a new Paragraph element at the desired location within the rich text field.
2. Give the Paragraph element a unique class name, such as "anchor-point".
3. Enable the "Hidden on published site" option for the Paragraph element to hide it from view.
4. In the Navigator panel, right-click on the Paragraph element and select "Copy Unique Selector."
5. Go to the page where you want to link to the anchor point and add a regular link element (e.g., a Text Link or Link Block).
6. Set the link's URL to `#`, and in the link settings, add the unique selector of the Paragraph element preceded by a hash symbol. For example, `#paragraph-12345`.
7. Publish your site and test the link to see if it scrolls to the desired anchor point.

Option 3: Custom code and CMS fields
1. Create a new CMS field specifically for the anchor point name, such as "Anchor ID."
2. In the CMS collection template, add a Plain Text field or a Dropdown field where you can populate anchor point names.
3. Create a Div or Section element at the desired location within the rich text field.
4. In the element settings, set its ID attribute to the value of the "Anchor ID" field from the CMS item using dynamic data (e.g., `{{item.anchorID}}`).
5. Style the anchor point element using custom CSS.

Remember that these workarounds may require some technical proficiency and may not be as user-friendly as a built-in anchor point feature. If you're not comfortable with custom code or embed elements, you can consider using other methods like separate CMS Collection pages or custom dropdown navigation menus to achieve a similar effect.

Rate this answer

Other Webflow Questions