HTML Utils Component

Helpful HTML-related functions for building HTML documents and HTML-based emails.
Component key: html-utils#
DescriptionThe HTML Utils component provides helpful functions for building and formatting HTML documents.
#
Actions#
Convert to Inline CSSConvert an HTML document to use inline styles | key: convertInlineCss
Input | Notes | Example |
---|---|---|
Input HTML code | Notes | Example
|
This action leverages the juice NPM package to apply CSS defined in <style>
tags to inline HTML elements.
#
Output Example Payload{ "data": "<html>\n <head>\n <title>My Webpage</title>\n </head>\n <body>\n <div style=\"color: red\">Hello World</div>\n </body>\n</html>\n"}
#
Format HTMLApply prettier to an HTML document | key: formatHtml
Input | Notes | Example |
---|---|---|
Input HTML code | Notes | Example
|
#
Output Example Payload{ "data": "<html>\n <head>\n <title>My Webpage</title>\n <style>\n div {\n color: red;\n }\n </style>\n </head>\n <body>\n <div>Hello World</div>\n </body>\n</html>\n"}