â–Ľ
Streaming live at 10am (PST)

CMS rich text - Anchor (URL scroll to section)

Hello,

I am looking for a way put some anchor points inside the CMS rich text.

Example:
I have CMS site with some large rich text block including many paragprahs. I just need to make some anchors to be able directly scroll to the section using the url url.com/page#example_id_scroll

Help me please.

Thanks Petr.


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

That would be awesome. As far as I know though, you can’t set specific id’s to any elements inside of a RTE.

I was thinking about pasting the transparent background, set-up the URL on the image and make the URL like: #scroll-one. But it is not working.

I am looking for any workaround tips :muscle:

Let me know if this helps:

:grin:

1 Like

Thanks man, this solution I will use in different scenario. However right now I am looking to apply the anchors directly in CMS collection text.

Gotcha. Yeah I don’t believe that is currently possible.

What I would do is create a wishlist item for that feature here:
https://wishlist.webflow.com/

This way people can vote on it and Webflow will see it. :slight_smile:

There is a created one. I upvoted it a week ago. I just need some workaround anyway, in addition with some javascript or whatever.

Right… but the issue is, you need to be able to add an ID directly to an html element (RTE elements in this case such as text, titles or images). There is no way to actually do that within the RTE Field in the CMS. So it makes the option of using Javascript pointless when it has nothing to point to and then again, if or when that is possible you wouldn’t need javascript.

Unless…
Lets say we chose a key word like “myMarker-customID” (which you would write in the RTE field in the CMS) and have Javascript scan the RTE element for any text that starts or contains “myMarker-” and then appends an ID value (which directly follows the hi-fen to that text as well as hides it.

I could see that working in theory.

If you could try that would be awesome. I am not so strong in using js to build it up. You’ll safe so much lives :smiley:

Not sure when I can possibly have a resolution though…

I wrote a post on my blog showing how to create a button inside of a rich text element based on a certain condition. This could easily be modified to achieve the same thing that you’re looking for. Here’s the blog post => https://wfhow.com/buttons-in-rich-text/ with instructions.

I’m trying to figure this out too! I wanted to work around it by creating a static webpage and then park it under /blog.

Is that possible?

1 Like

@webdev Jeff that’s pretty awesome! Did you read my reply up a few posts (the paragraph that starts with “unless…”?

Thanks. You can do almost anything with that approach. Yes, I did read your post, that is similar. The issue is not the JS, just coming up with a consistent target.

Exactly! That’s what I was thinking!

So could you translate it to the anchor point? I don’t know exactly what to do with the code :smiley:

A static page can’t be a child of a collection slug. So you can’t do that.

@petrbilek - Your needs are specific to a client project I assume. I am available for freelance work. PM me if you are interested.