Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Sightly rte hyperlink rendering issue

Avatar

Level 4

Team,

I am trying to display html content from rte in my Sightly component. I am using {data @context='html'}. This works fine for complete HTML content except  hyperlinks in content are getting rendered as plain text. I have tried all other display context available and nothing seems to be working here.

Has anyone else faced similar issue?

3 Replies

Avatar

Level 4

Component - demo

1. Component Dialog has a field with xtype="richtext", name="./text"

JS file(demo.js)

use(function(){

var text = properties.get("text","");

return{

text:text

}

});

 

3. component html file

<div data-sly-use.demo="demo.js"> ${demo.text@context='html'}</div>

 

Drag this component on one page. And in component dialog paste below HTML code:

<ul>

    <li>Line 1</li>

<li><a href="http://www.google.com">Google Link</a></li>

<li>Line 3</li>

</ul>

 

When this link is displayed on webpage, it just shows Google Link label instead of hyperlink.

Avatar

Employee

I tried to reproduce this, but it shows the correct link. In any case you don't need the Javascript code, you can point directly to properties.text.

Can you share something like a package or so?