Text to html



  • Hey guys,

    I am wondering what is the easiest way to parse html that I get from data and render it to the template?
    Playground link.

    I saw that there is this npm module, but I don't know how to use html-to-text recipe along with chrome-pdf because I need this functionality inside my pdf template.

    I know I could use jquery after rendering and just rewrite every element that I need but I want to avoid that because of the volume of the work and performance.

    Any help would be great!



  • The double brackets {{foo}} used in handlebars are escaping html.
    The triple brackets {{{foo}}} don't.
    So you want to use Tripple in this case.
    https://playground.jsreport.net/w/anon/fleb0RAh
    https://handlebarsjs.com/



  • Thank you very much Jan!
    I noticed that content renders with double as well as triple brackets, but did not know the difference.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.