Want to render HTML code in the page which is actually inside the entity parameter.

0
Hi, I have a attribute which has some HTML code inside that I want to render it in my page but I am not able do so as if I use normal common text it will take html scripts also considering it as a string and if I take HTML snippet it does not render the entity data no option for that.   Please help how can I make my html code to work which is inside entity parameter. Thanks in advance.
asked
2 answers
1

I suggest you use the Format String widget.

The 'display string' is rendered as HTML and you can use context attributes to fill the custom parts.

The Custom String is not ideal, as it makes your page load slower and causes the data to pop-in after the page has already loaded.

answered
-1

Did you try the latest HTML snippet widget? This contains a context version, so you should be able to use your entity data in it.

https://appstore.home.mendix.com/link/app/56/Mendix/HTML/-JavaScript-Snippet

Edit: 

I have to admit I hadn't used the context version of the HTML Snippet before, but unfortunately it hasn't become clear to me how you could use it to target your entity data. Instead, for your purposes I think the CustomString widget could suffice. You can use a microflow to determine the HTML and the widget can render the HTML that you output.

https://appstore.home.mendix.com/link/app/1426/Mendix/CustomString

answered