Replacement for CustomString widget

0
Hi, We are using CustomString widget to render html content. But we see that its behavior is not correct in some samsung devices. The large html content is shown as truncated in the screen. Is there another widget that I can use to render dynamic html content ? 
asked
3 answers
1

Hi Vinod, when I need to view HTML content I always use the formatString widget. It's the best;-P Please note that you need to set the Render as HTML attribute see screendump. Can you let me know if this works out for your large HTML content?

answered
0

Did you try this widget: https://appstore.home.mendix.com/link/app/56/Mendix/HTML/-JavaScript-Snippet ?

Regards,

Ronald

 

answered
0

You can also just use an HTML snippet with context with template literals

if(
    this.contextObj!=null
){
    try{
        $(this.domNode).html(
`<div class="container">
    <div class="row">
        <div class="col-md-12">
            ${this.contextObj.get("post_content")}
        </div>
    </div>
</div>`
        );
    }catch(e){
        this.domNode.innerHtml=`<div class="alert alert-danger">
    ${e}
</div>`;
    }
}

In this case you can do whatever you want with the data, loops, processing, templating (with lodash or vanilla), etc.

Additionally, look into Andrej Koelewijn’s excellent server side Mustache templating at ako/MxMustache, then take that and render client side as HTML

answered