Streaming live at 10am (PST)

Workarounds for creating anchor links in CMS rich text elements?

Has anyone figured out workarounds for creating anchor links in CMS items? I know RTE doesn’t allow assigning an ID to text elements inside, but surely there’s some other way to do this?

Or can we really not use anchor links in CMS RTE blocks??


Here is my public share link: LINK
(how to access public share link)

It’s a pretty ugly workaround but works not the less. CMS RT doesn’t allow text elements to have an ID but there’s an exception with embeds. Try placing an empty embed on top of the RT field and populate it with this code:

<div id="hot-sauce"></div>

After publishing, go to the URL where it displays that item and place “#hot-sauce” at the end of the URL to test it.
RT also adds styling on embeds (unless it’s an iframe), so if you have a heading on your RT, you could replace that with:

<h1 id="topic">Hot Sauce</h1>

replace the h1 if you are using a different heading level.

1 Like