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?
Views
Replies
Total Likes
any sample you can share?
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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?
Views
Replies
Total Likes