Skip to content

Commit

Permalink
Merge pull request #4895 from segmentio/visual-html-editor
Browse files Browse the repository at this point in the history
Add HTML Editor
  • Loading branch information
rchinn1 authored Jul 24, 2023
2 parents 2e66965 + a182d03 commit 77974a1
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 19 deletions.
4 changes: 3 additions & 1 deletion src/_data/sidenav/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,9 @@ sections:
- path: '/engage/content/email/template'
title: Email Template
- path: '/engage/content/email/editor'
title: Email Template Editor
title: Drag and Drop Editor
- path: '/engage/content/email/html-editor'
title: HTML Editor
- path: '/engage/content/sms/template'
title: SMS Template
- path: '/engage/content/whatsapp'
Expand Down
2 changes: 1 addition & 1 deletion src/engage/campaigns/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Use Engage to send [email](/docs/engage/campaigns/email-campaigns/) and [SMS cam

## Build email and SMS templates

With Engage, you can build [email](/docs/engage/content/email/template/) and [SMS templates](/docs/engage/content/sms/template/) to use throughout your campaigns. Build an email template using a visual editor or an HTML code editor. Personalize templates with merge tags and test your messages before you send them in campaigns.
With Engage, you can build [email](/docs/engage/content/email/template/) and [SMS templates](/docs/engage/content/sms/template/) to use throughout your campaigns. Build an email template using a drag and drop or a visual HTML editor. Personalize templates with merge tags and test your messages before you send them in campaigns.

Engage saves the message templates for you to preview, maintain, and reuse throughout your campaigns.
26 changes: 18 additions & 8 deletions src/engage/content/email/editor.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: Email Template Editor
title: Drag and Drop Editor
plan: engage-premier
---
Use Twilio Engage to build email templates with a *what you see is what you get* (WYSIWYG) visual editor. Use drag and drop tools to design the template layout and include user profile traits to personalize the message for each recipient.
Use Twilio Engage to build email templates with a *what you see is what you get* (WYSIWYG) Drag and Drop Editor. Use drag and drop tools to design the template layout and include user profile traits to personalize the message for each recipient.

You can navigate to the visual editor from the **Select Editor** screen:
You can navigate to the Drag and Drop Editor from the **Select Editor** screen:
- When you build a new email template or edit an existing one.
- From a Send Email step in a Journey.

From the **Select Editor** screen, select **Visual Editor** and click **Build Email**.
From the **Select Editor** screen, select **Drag and Drop Editor** and click **Build Email**.

The visual editor consists of a [left sidebar](#left-sidebar) with design modules and an [email canvas](#email-canvas).
The Drag and Drop Editor consists of a [left sidebar](#left-sidebar) with design modules and an [email canvas](#email-canvas).

## Left sidebar

Expand Down Expand Up @@ -89,7 +89,7 @@ Select and drag and image into the canvas, then return to the sidebar to set ima
## Upload an image
Use the Uploads tool to upload an image for the email template. Click **Upload Image** to select an image stored locally or drag and drop images in the sidebar dropzone.

> note ""
> info ""
> The maximum image file size you can upload is 10 MB.
## Link actions
Expand Down Expand Up @@ -119,11 +119,11 @@ Add an unsubscribe link to text:
You can alternatively add a [predefined unsubscribe](#add-blank-columns-or-predefined-content-blocks) link content block.

## Personalize with merge tags
Add merge tags in the visual editor to personalize your message with user profile traits.
Add merge tags in the Drag and Drop Editor to personalize your message with user profile traits.

1. Select any heading or body text in the email canvas. From the text toolbar, click **Merge Tags**.
2. Select the profile traits to include from the drop down menu.
3. Based on cursor placement, profile traits are added to the email from merge tags.
3. Based on cursor placement, Engage adds merge tags to your email template.

Engage supports liquid templating to create dynamic content in the email design editor and the SMS editor.

Expand All @@ -148,3 +148,13 @@ To view more examples related to your use case, visit the [LiquidJS docs](https:
## Save the template

After you design the email, click **Create Email Template**.


## Next steps

- Learn more about [building email templates](/docs/engage/content/template/) to include in your Engage campaigns.

- You can learn about the [HTML Editor](/docs/engage/content/email/html-editor) for both code and visual editing capabilities from a single view.

> warning ""
> once you create an email with the Drag and Drop Editor, you can't modify it with the HTML Editor, and vice versa.
131 changes: 131 additions & 0 deletions src/engage/content/email/html-editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
title: HTML Editor
beta: true
---

Use the HTML Editor to design your email template with both code and visual editing capabilities. Build your email template with code, copy and paste existing code, or use the visual editor for a code free design experience.

On this page, you'll learn how to use the HTML Editor to build personalized email templates for your Engage campaigns.

## Getting started

You can navigate to the HTML Editor in two ways:
- When you build a new email template or edit an existing one.
- From a Send Email step in a Journey.

From the **Select Editor** screen, select **HTML Editor** and click **Build Email**.

From the editor screen, click **Use HTML Editor** or **Use Visual Editor** to toggle between the two editors.

## Visual editor

Use the visual editor for a no-code option to design your email. With the visual editor, you can:
- Add or modify headings and text
- Modify text color, size, and style
- [Insert an image](#insert-an-image)
- Add [merge tags](#personalize-with-merge-tags) and links
- Add emojis

Engage updates any changes you make in the visual editor to the HTML editor in real-time.

### Insert an image

To insert an image from the visual editor:
1. Select the image icon in the visual editor toolbar.
2. Add the image URL source and alternative text.
3. Edit the image width and height.
- You can also click and drag the corners of the image to resize it in the visual editor.
4. Click **Save**.


### Preview for desktop or mobile display

To preview your email template, click the preview icon in the visual editor toolbar.

From the preview screen, you can toggle between desktop or mobile to view the email in both displays.

## HTML editor

Use the HTML editor to maintain your email template with code. Copy and paste existing code or build a new template in the editor.

Engage displays any changes you make in a preview screen to the right of your code. You can preview your email in both desktop and mobile display.

Click **Format** at any time to properly indent and format your code in the HTML editor.

> info ""
> When you toggle from the HTML editor to the visual editor, Engage may make minor changes to your code formatting. If Engage re-formats your code, it will not affect the email layout.
### Error flagging

Engage displays in-line error flags in the code editor to help you debug your code. If there are errors, you might not see content as expected in the preview screen until you've debugged your code.

## Personalize with merge tags
Add merge tags to personalize your message with user profile traits.

1. From the text toolbar in the visual editor, click the **Merge Tags** drop-down menu.
2. Select profile traits to add to the merge tags.
3. Based on cursor placement, Engage adds merge tags to your template.

> success ""
> You can also add merge tags to your email right from the code editor.
### Liquid templating

Engage supports liquid templating to create dynamic content in the HTML Editor.

{% raw %}

For example, use `{% if %}`, `{% elseif %}`, and `{% else %}` tags to call a product by name if known, or use a default message:

```
{% if profile.traits.product_title == "Sneakers" %}
Hey, view our latest sneakers!
{% elsif profile.traits.product_title == "Sandals" %}
Hey, check out these sandals!
{% else %}
Hey, check out our latest footwear.
{% endif %}
```
{% endraw %}

If you use liquid templating, be sure to [test your email](/docs/engage/content/email/template/#test-the-email-template/) to make sure that everything renders properly.

> success ""
> While both the HTML and visual editor support liquid templating, Segment recommends using the HTML editor to write liquid templating.
> warning ""
> Engage doesn't support liquid template syntax that produces partial blocks of HTML.
To view more examples related to your use case, visit the [LiquidJS docs](https://liquidjs.com/tags/if.html){:target="blank"}.

## Add unsubscribe links
It's always best practice to include an unsubscribe link in the emails you build. Engage adds an unsubscribe link to email templates, which you can edit at any time.

You can add unsubscribe links from the visual or HTML editor.

From the visual editor:

1. Select the link icon in the [visual editor](#visual-editor) toolbar.
2. Enter `[unsubscribe]` in the URL field.
3. Enter the link attributes and text.
4. Click **Save**.

To add a link from the code editor, use `<a href = "[unsubscribe]"> </a>` in your HTML.

For more on email unsubscribe links, view SendGrid's [best practices](https://sendgrid.com/blog/managing-your-marketing-email-unsubscribes/){:target="blank"}.


## Save the template

After you design the email, click **Create Email Template**. You can navigate to **Engage > Content > Templates** to view and maintain your email template.

## Next steps

- Learn more about [building email templates](/docs/engage/content/template/) to include in your Engage campaigns.

- You can also learn about the [Drag and Drop Editor](/docs/engage/content/email/editor/) in Engage to build Email templates with drag and drop functionality.

> warning ""
> Once you create an email with the HTML Editor, you can't modify it with the Drag and Drop Editor, and vice versa.

16 changes: 8 additions & 8 deletions src/engage/content/email/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plan: engage-premier
---
Use Twilio Engage to build personalized email templates to store and use throughout marketing campaigns.

Build an email template from scratch using a [visual editor](/docs/engage/content/email/editor/) or with an HTML code editor. Include [personalized content](#personalize-with-merge-tags) in the subject line, preview text, and email body to engage with users based on their profile traits and actions.
Build an email template from scratch using the [Drag and Drop Editor](/docs/engage/content/email/editor/) or the [HTML Editor](/docs/engage/content/email/html-editor/). Include [personalized content](#personalize-with-merge-tags) in the subject line, preview text, and email body to engage with users based on their profile traits and actions.


## Build an Email template
Expand All @@ -28,8 +28,8 @@ To configure an email template, click **Create Template**.
5. Add email addresses to receive a blind carbon copy of your email.
6. Add preview text and the subject line. Use [merge tags](#personalize-with-merge-tags) to personalize the email template with real-time profile traits.
3. Select the design method to build your email template:
- [**Visual Editor**](/docs/engage/content/email/editor/) is an easy to use, drag and drop WYSIWYG tool with customizable content blocks.
- **HTML Editor** is an HTML editor with a side-by-side preview screen. This editor provides complete HTML editing access with error flagging.
- [**Drag and Drop Editor**](/docs/engage/content/email/editor/) is a drag and drop WYSIWYG tool with customizable content blocks.
- [**HTML Editor**](/docs/engage/content/email/html-editor/) contains both a code and visual editor from a single view. This editor provides complete HTML editing access with error flagging.
4. Design the email template, then click **Create Email Template**.

## Test the Email template
Expand All @@ -52,15 +52,15 @@ Personalize email content in Twilio Engage with real-time profile traits in your


As you configure the template, click **Merge Tags** and select the profile traits to include. Engage inserts the merge tags based on cursor placement.

You can also add merge tags in heading and body text as you design an email with the [visual editor](/docs/engage/content/email/editor/). Engage supports [liquid templating](https://liquidjs.com/tags/if.html){:target="blank"} to create dynamic content in the email design editor.
You can also add merge tags in the heading or body text as you design an email with the [Drag and Drop](/docs/engage/content/email/editor/) or [HTML](/docs/engage/content/email/html-editor/) editors. Engage supports [liquid templating](https://liquidjs.com/tags/if.html){:target="blank"} to create dynamic content in the email design editor.

> info ""
> To learn more about profile traits, visit Segment's [Computed Traits](/docs/engage/audiences/computed-traits) and [SQL Traits](/docs/engage/audiences/sql-traits/) documentation.
## Include unsubscribe links

When you build email templates, it's your responsibility to include an unsubscribe link in your message. Add unsubscribe links to an email template from the [visual](/docs/engage/content/email/editor/) or HTML editor.
When you build email templates, it's your responsibility to include an unsubscribe link in your message. Add unsubscribe links to an email template from the Drag and Drop or HTML editors.

When a recipient clicks on an unsubscribe link, they'll see a confirmation page and the recipient's subscription state is updated.

Expand All @@ -81,6 +81,6 @@ After you clone a template, you can edit it from the Templates page.

## Next steps

View some [email deliverability tips and tricks](https://docs.sendgrid.com/ui/sending-email/deliverability){:target="blank"} from SendGrid.
- View some [email deliverability tips and tricks](https://docs.sendgrid.com/ui/sending-email/deliverability){:target="blank"} from SendGrid.

You can also use the Templates screen in Engage to [build SMS templates](/docs/engage/content/sms/template/).
- You can also use the Templates screen in Engage to [build SMS templates](/docs/engage/content/sms/template/).
2 changes: 1 addition & 1 deletion src/engage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To learn more, visit the [CSV Uploader](/docs/engage/profiles/csv-upload/) docum

#### Build Email, SMS, and WhatsApp message templates

Build personalized [email](/docs/engage/content/email/template/), [SMS](/docs/engage/content/sms/template), and [WhatsApp](/docs/engage/content/whatsapp) templates in Twilio Engage for use in your campaigns. Design email templates with a WYSIWYG [visual editor](/docs/engage/content/email/editor/) or a code editor. Engage saves the templates for you to preview, edit, and reuse throughout Journeys.
Build personalized [email](/docs/engage/content/email/template/), [SMS](/docs/engage/content/sms/template), and [WhatsApp](/docs/engage/content/whatsapp) templates in Twilio Engage for use in your campaigns. Design email templates with a WYSIWYG [Drag and Drop Editor](/docs/engage/content/email/editor/) or the [HTML Editor](/docs/engage/content/email/html-editor/). Engage saves the templates for you to preview, edit, and reuse throughout Journeys.

#### Personalize with merge tags
Insert real-time user profile traits from merge tags to personalize each message. For example, address recipients by name or highlight new products from a user's favorite brand.
Expand Down

0 comments on commit 77974a1

Please sign in to comment.