posthtml-expressions
posthtml-expressions copied to clipboard
Can't render simple html inside an expression
Not sure why this does not work. I tried the {{{}}} option as well. I am kinda a new to this but was hoping someone could point me in the right direction...
{{text ? '<strong>yes</strong>': ''}}
am I missing something? it just shows written out in the browser instead of actually rendering the html.
Use triple braces {{{text ? '<strong>yes</strong>': ''}}}
to unescape the tags.
@cossssmin Hmm for some reason that does not work for me, is there any options that need to be set? I am using parcel and a posthtmlrc file. For some reason anytime I include html in a string it does not work, but everything else does...
Different example:
{{{'<strong>yes</strong>'}}}
The above example literally just shows {{{'<strong>yes</strong>'}}}
in the browser window.
But when I remove the strong tags everything works like normal and it doesn't show the "{{{" in the browser.