Developer forum

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

Linking to paragraphs from the rich text editor

Dan Tomicic
Reply

Hi DW,

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


Replies

 
Nicolai Pedersen
Reply

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
</div>

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: https://doc.dynamicweb.com/documentation-9/platform/advanced-settings/web-and-http#3521

 
Dan Tomicic
Reply

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).