Add HTML formatting dynamically to entry/notification email instead of raw string

studioalloy
Wed, 20 Jan 2021 10:51:10 +0000
Get Help

I want to dynamically fill a textarea field with some HTML. I’ve got the whole setup working, but the HTML tags is just shown in the entire. Is there a way to format a certain merge that so that it will encode (?) the HTML.

What I have at the moment:

const myDynamicContent =`
Some title
Some content
`

and when I view the entry in the back-end of within my email it looks like this:

Some title
Some content

and I want it to look like this

Some title

Some content

is there a way for a merge tag to be encoded to HTML instead of showing the raw string? Something like `{My Field:encodeHTML}

3 posts - 3 participants