Sightly rte hyperlink rendering issue | Community
Skip to main content
Level 4
September 13, 2016

Sightly rte hyperlink rendering issue

  • September 13, 2016
  • 1 reply
  • 3496 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Feike_Visser1
Adobe Employee
Adobe Employee
September 13, 2016

any sample you can share?

Level 4
September 13, 2016

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.

Feike_Visser1
Adobe Employee
Adobe Employee
September 14, 2016

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?