N
Novu12mo ago
bjornaer

Bypassing HTML formatting

I currently am sending an HTML through the SDK, in my payload, to be rendered in an email in Novu through the tripple braces as such: {{{html}}} when I preview my HTML the formatting is ok, it's mostly text. When I receive my E-mail the formatting is off, some text is purple and the font size changes halfway through. Is there any way I can make sure nothing overrides the style of my HTML? Or some guideline I might be missing when creating my HTML?
6 Replies
Pawan Jain
Pawan Jain12mo ago
Hi @bjornaer Please check your selected layouts. If there is any style code collapse? You can create a simple layout and select that layout and try again? https://docs.novu.co/content-creation-design/layouts
bjornaer
bjornaerOP12mo ago
I am using the custom option and passing my HTML via a variable in my payload, does that get rendered on top of the selected layout?
Pawan Jain
Pawan Jain12mo ago
layout is like a container email html content is injected in layout
bjornaer
bjornaerOP12mo ago
ok, got it, let me try creating a simple one then yep, that did it, it was the layout! Thank you very much!
empe
empe12mo ago
Thanks for letting us know! Can you maybe send here the example so we could add it to the docs?
bjornaer
bjornaerOP12mo ago
I created an empty layout that simply contains {{{body}}} so basically my incoming html gets rendered as is on an empty layout because the default one for example had a lot of things that I was handling already on my own html, and that probably caused my issues
Want results from more Discord servers?
Add your server