Announcement

Collapse
No announcement yet.

Correct way to render HTML in PDF templates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Correct way to render HTML in PDF templates

    Greetings EspoCRM community!

    I created a WYSIWIG field with a simple bulleted list that I would like to use with the Print to PDF functionality, but it's not actually rendering the HTML, as can be seen from the below screenshot.

    My template tags look like this currently - {{#each serviceClauses}} {this.name} {this.serviceClause} {{/each}}

    but I've also tried with two brackets - {{field}} - as well as with 3 - {{{field}}}, as I was searching the forum I found an old post referring to the number of brackets, but it doesn't seem to make a difference.

    Is there something I'm missing? Would be amazing to get this to work the way I envision.
    Last edited by boognish; 05-07-2022, 05:22 AM.

  • #2
    It should work i have tested it and it working fine, you just make sure to wrap the WYSIWIG field in 3 brackets e.g {{{description}}} then it will print all HMTL format from the field into the pdf. see https://docs.espocrm.com/user-guide/...df/#text-field

    good luck

    Comment


    • #3
      Thank you rabii, works perfectly. I can swear I tried it with 3 before, but maybe it was formatting inside the editor that I messed up.

      Comment


      • rabii
        rabii commented
        Editing a comment
        It happens sometimes, just glad it works for you now.
    Working...
    X