When using the “Public Notes” in an invoice, I want to add them to the PDF.
The PDF displays <p>This is the public notes content</p>
as raw text.
This is how I add it to a “Template” (Settings > Invoice Design > Custom Designs > Design > Select “Template” and check “invoices” as entity).
<ninja>
{% set invoice = invoices | first %}
<div class="container container-text">
{% if invoice.custom2 %}<h2>{{ invoice.custom2_label }}: {{ invoice.custom2 }}</h2>{% endif %}
{% if invoice.public_notes %}<div id="notes">{{ invoice.public_notes | raw }}</div>{% endif %}
</div>
</ninja>
My questions:
- Why does it not render as Html (to be converted to a PDF)?
- Why does it wrap in a Paragraph-Tag, which might bring some unwanted styling if applied and is easy to wrap anyway by ourselfs?
- How do I get the raw string when Twigs
raw
andstriptags
functions are not supported?
Thanks in advance.