Formatting
In the code editor of Design Studio, use the Formatting transformer to apply your choice of formatting to the source code.
Click Transformers > Formatting to get started.
Format your source code
Click Prettify to make your code easy to read.
Clicking this unlocks further preferences you can enable:
- Indent with spaces or tabs
- Wrap HTML attributes
We remember the state of those toggles if you deactivate and later reactivate them.
To format the code in your editor, click Format Document at the top of the editor.
Reduce the size of your email
Click Minify to reduce the size of your source code when it sends. You can see the size of your email before and after at the bottom of the editor.
Clicking this unlocks further preferences you can enable. We remember the state of those toggles if you deactivate and later reactivate them.
Encode HTML entities
Special characters (like ©), reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces) can cause bugs that are hard to track down in emails.
To reduce these issues, turn on Encode HTML entities. We’ll automatically convert your characters to HTML entities, which start with an ampersand (&) and end with a semicolon (;). For example, © becomes ©.
Prevent widow words
This transformer prevents the last words of paragraphs from being on their own lines, which can make your email look cleaner.
Preheader spacing
When your email has preheader text, Customer.io adds hidden spacing after it when we send the email. The spacing keeps your email’s opening text out of inbox previews, so most inboxes show only your preheader next to the subject line. Preheader spacing is on by default.
Turn off Preheader spacing if you want the inbox preview to show your preheader followed by the start of your email.
- Open your email, and click Code.
- Click Transformers > Formatting.
- Select Preheader spacing to disable it.
Each language version of an email has its own setting. When you add a language, the new version starts with the default language’s setting.
With the spacing off, the inbox preview shows your preheader followed by the first text in your email. If your email starts with the same text as your preheader, readers see that text twice. The Review tab warns you when this happens.