Developer forum

Forum » Feature requests » Linking to paragraphs from the rich text editor

Linking to paragraphs from the rich text editor

Dan Tomicic

Hi DW,

It would be great if linking to paragraphs from the CKEditor had the expected behaviour of scrolling to the paragraph


Nicolai Pedersen

It probably would if your markup is correct.

In the template that renders the paragraphs, you have to insert an id on the div with the paragraph id in it - something like this:

<div id="123">
.... paragrah template code here

And then in your template where you insert the link, ensure it links like this: <a href="#123">Link to paragraph</a>

Make sure the link is not like this: <a href="/some/url#123">

Also make sure you do not have base href enabled (as that will reload the page when the anchor is clicked) - see "Do not add base href" in HTTP settings:

Dan Tomicic

Hi Nicolai, thank you for your answer.

I should have specified in the original post but my feature request regards enabling this for elements created in the Visual Editor - with the standard templates (eg. on the Paragraph/Row base templates).