Hi all I wonder if someone can help me, I am having ongoing issues with HTML displaying in calculation fields how I want, some examples:
If I get some HTML in on a payload and I want to show it on a record via a calculation field then I save it to a Multiple line text field however that doesn’t really work as it gets messed up and most of the time I just end up showing the HTML code.
So I base64 encode it put the encoded string in the text field and the bring it into the calculation decode it and display:
const html = Buffer.from(@v_messageBody, 'base64').toString('utf8');
`
${html}
`
I don’t mind that it doesn’t look exactly the same in Tape as it does in the HTML editor however I would expect the Tape-decoded HTML to look the same as my local machine-decoded version.
I have also tried striptags on the encoded coming in from the Multiline Text before decoding and it makes no difference
If I understood correctly, are you getting the HTML code from a payload? What I usually do when I want the HTML code to show exactly as it is supposed on Tape is the following:
Add a Link field (let’s call it “HTML link”)
Now, you can manipulate the HTML code directly from the multi-line text field and refresh the page to update. The HTML layout will render exactly how it is supposed to look.
Hi @Luis, thanks for that, a web link page does display the HTML very nicely and that is retained when embedding it into a calculation field, I may well go this route however I feel that there are some security implications with this solution not to mention the additional overhead.
Looks like the Multiline field is not the best way to achieve what you want. Also this might be the reason your HTML is broken in the field:
(I don’t think its fixed yet?)
Before we try to fix an “xy-problem” - what do you want to achieve? Looks to me like an HTML Mail to be send afterwards?
How about only having the field with the area to be edited and show the result in the calculation field? Also using this for being sent afterwards?
I currently have emails, which are plain status messages without fancy styling. I pre-populate the field via automation with greeting and footer (can be edited), but add the legal footer later from the automation. All the parts of this mail are in a settings app, which can be edited by the admin of this organisation.