JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Aeropage Documentation
Documentation
Coming Soon
More
Inputs Guide
HTML editor
Spacing problem in emails
How to use it as email content?
When you have HTML from diffrent source than aeropage HTML editor. Make sure to
view this guide
.
Once you have your html uploaded, make sure to create escaped version of it. Escaped html is a version that includes ‘\’ before any special character, so that airtable know that it is not a markdown.
Build an automation for escaping html
Automation includes
Trigger “When a record is updated”
Run a script
Update record
Make trigger
Copy code and paste it as script
var replacements = [
[/\*/g, "\\*"],
[/#/g, "\\#"],
[/##/g, "\\##"],
[/###/g, "\\###"],
[/\*\*/g, "\\**"],
[/~~/g, "~~"],
[/\n/g, "<br>"],
[/\[]/g, "\\[]"],
[/\[x]/g, "\\[x]"],
[/-/g, "\\-"],
[/\[/g, "\\["],
[/\]/g, "\\]"],
[/\`/g, "\\`"],
[/\`\`\`/g, "\\```"],
[/_/g, "\\_"],
];
const htmlToMarkdown = (html) => {
return replacements.reduce(function (html, replacement) {
return html.replace(replacement[0], replacement[1]);
}, html);
};
const { HTML } = input.config() ?? {};
if (!HTML) {
throw Error("HTML field not found");
}
output.set("escapedHtml", htmlToMarkdown(HTML));
Update record
Send an email
Result
How to use it as email content?
Build an automation for escaping html
Send an email
Result
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.