How-to
13 days ago

Part 2. Advanced adaptation of an email template

Authors
Roman Burdyga Product designer and design team lead at Stripo
Zore Mustafaieva Content writer at Stripo
Part 2. Advanced adaptation of an email template
Table of contents

In the previous article, we adapted a custom HTML email in Stripo so that you could edit images, links, and text directly in the editor without changing the HTML code.

But what if you need to move past basic content editing? For example, you may want to add or rearrange content blocks, change the layout, or work with the imported email using Stripo's drag-n-drop tools.

In this case, the imported HTML requires extensive adaptation. We'll continue working with the email template example from Email Love and explain how to adjust it step by step.

Example of an email from Email Love

(Source: Email Love)

You might also like

Email import methods explained: Which one should you choose?Email import methods explained: Which one should you choose?

Nesting structure of Stripo emails

Before you adapt custom HTML, it’s important to understand how the Stripo editor recognizes and handles different parts of an email.

How Stripo elements are nested 

The Stripo email hierarchy looks like this:

Stripe → Structure → Container → Block

For example, consider a stripe that contains 1 structure with 2 containers, with each container containing picture and text basic blocks.

Stripo email nesting structure

Each level of the hierarchy is identified by a Stripo-specific class:

  • stripe: esd-stripe;
  • structure: esd-structure;
  • container: esd-container-frame;
  • block: an esd-block-* class, such as esd-block-image or esd-block-text.

A stripe can contain multiple structures. A structure can contain up to 11 containers, and a container can hold multiple blocks.

When your HTML template follows a similar hierarchy, adapting it to Stripo is relatively simple. 

Adapting custom HTML that doesn't match Stripo blocks

In most cases, you can add the required Stripo classes to existing HTML elements to define stripes, structures, and containers. However, simply adding a class isn't always enough to adapt a block correctly, as its existing layout may be too specific. 

If an existing element can't be adapted as a native Stripo block without changing its markup, you can use the esd-block-html class. This allows you to preserve the custom HTML and ensures that the element is recognizable as a block in Stripo. Consequently, you gain controls for actions such as moving, copying, saving, and deleting it.

Sometimes you may also need to restructure the existing HTML to turn an element into a native Stripo block. We'll provide an example of this when adapting the background image later in the guide.

List of available block classes

Stripo uses specific classes to identify different types of content blocks:

  • esd-block-image: Image;
  • esd-block-text: Text;
  • esd-block-button: Button;
  • esd-block-spacer: Spacer;
  • esd-block-social: Social;
  • esd-block-html: HTML;
  • esd-block-menu: Menu;
  • esd-block-banner: Banner;
  • esd-block-timer: Timer;
  • esd-block-video: Video;
  • esd-block-amp-carousel: AMP Carousel;
  • esd-amp-accordion: AMP Accordion;
  • esd-amp-form: AMP Form.

The esd-* classes are used by the Stripo editor to recognize the structure of an email and enable drag-n-drop editing. Custom HTML will still render in Stripo without these classes, but its elements won’t support Stripo’s drag-n-drop functionality.

When you export the finished email from Stripo, the esd-* classes are removed from the HTML, so that they don’t add extra code weight to the exported email.

How to adapt a custom HTML email template in Stripo

Now that we've covered the basic hierarchy of Stripo emails, let's apply it to our Flight Centre email. We'll start with its pre-header, header, and menu and then work from the outer stripe and structure down to the individual content blocks. 

Stripe adaptation

First, define the stripe for the email header. In the HTML code, find the <td> element that wraps the entire header and add the esd-stripe class to it.

Adding the esd-stripe class to the email header

To check the result, hover over or click the adapted area in the editor. A frame with the stripe controls will appear.

Header recognized as a stripe in Stripo

Structure adaptation

Next, define the structure. Inside the stripe, find the <td> element that wraps the header content and add the esd-structure class to it. The structure should sit directly inside the stripe and contain the elements that will later be adapted as containers and blocks.

Adding the esd-structure class to the header

The adapted structure appears in the editor with its own controls:

Header structure recognized by the editor

Now, you can duplicate the adapted stripe using its controls. The duplicated stripe retains the adapted structure and can be edited in Stripo.

Duplicating the adapted header Stripe

Basic block adaptation

In this case, we’ll define the preheader and menu as Text blocks (esd-block-text) and the logo as an Image block (esd-block-image). The existing HTML includes an additional nesting level that can be defined as a container. However, we don’t need to adapt it as one in this example, as we’re only working with the existing blocks.

Adapting the preheader as a Text block

Adapting the Flight Centre logo as an Image block

Adapting the navigation menu elements as Text blocks

You might also like

Creating responsive email HTML templates: A complete guideCreating responsive email HTML templates: A complete guide

How to adapt a complex content section

Defining the stripe, the structure, and the container 

Now, let’s move on to a more complex part of the email: travel offer cards. Unlike the header elements we adapted earlier, each card contains several types of content, including text, images, prices, icons, and a CTA button.

Travel offer cards before advanced adaptation

This is where the full Stripo hierarchy becomes useful. We’ll define the whole section as a stripe, the row with the offer cards as a structure, and the first card as a container. We’ll adapt the content inside the card as individual blocks. 

First, find the <td> element that wraps the entire cards section and add the esd-stripe class.

Adding the esd-stripe class to the offer section

Next, find the <td> element that contains the row with the 2 travel cards and add the esd-structure class. Stripo will then recognize this part of the imported HTML as a structure within the stripe.

Adding the esd-structure class to the offer cards

Note: Don’t worry if some images aren’t visible in the editor yet. In our original HTML, they are implemented as background images with fallback colors and Outlook-specific VML rather than regular <img> elements. We’ll convert them into editable Image blocks and add the images later.

The next level we need is a container. Find the <td> element that wraps the first travel offer card and add the esd-container-frame class. Stripo will then recognize the entire first card as a container.

Adapting a travel offer card as a container

Besides working with the existing blocks inside it, you can now drag new blocks from the Block panel directly into the container area.

Adding blocks from the Blocks panel

Adapting simple content as native blocks

Some elements map directly to Stripo's native blocks. For example, you can define the destination category and offer title as Text blocks by adding the esd-block-text class to the <td> element that wraps the corresponding text.

Adapting offer content as native Text blocks

Don't confuse esd-text with esd-block-text. The esd-text class makes text inside an element editable, while esd-block-text defines the entire element as a Text block in the Stripe → Structure → Container → Block hierarchy. 

Preserving complex elements as HTML blocks

Not every element in an imported email maps neatly to a native Stripo block. The choice depends on how closely the existing HTML matches a native block structure.

If an element has a relatively simple markup that matches a native Stripo block, use the corresponding block class, such as esd-block-text, esd-block-image, or esd-block-button.

For elements with a more complex custom design, use esd-block-html instead. Stripo will recognize the entire element as an HTML block, which allows you to move, copy, save, or delete it. However, the content inside it won’t have the same editing options as a native Stripo block. Some elements, such as text marked with esd-text, can still be edited directly in the visual editor, while other changes may require editing the HTML code.

Because each feature in our layout combines a checkmark and text inside a nested table, we preserve the existing markup by adding esd-block-html to the <td> that wraps the component.

Adapting complex content as an HTML block

We use the same approach for the price, World360 Rewards section, departure date, and CTA button. For a typical CTA button, you can use the esd-block-button class to define it as a native Button block. In our example, the CTA button uses a custom layout with a nested table that doesn’t match the structure expected by a native Stripo Button block. To preserve the existing markup, we use the esd-block-html class instead.

Using esd-block-html for a custom CTA button

Converting the background image into an Image block

Let’s return to the card image that required a slightly different approach. As we mentioned earlier, the original HTML does not use a regular <img> element; instead, it implements the image as a background on a <td> with additional VML markup for Outlook. Because of this, it didn't map directly to Stripo's native Image block.

Background image implementation in the original HTML

To make the image replaceable through the visual editor, we replaced the original background image code chunk with a native Image block:

Converting the background image into a Stripo Image block

<tr>

  <td align="center" class="esd-block-image" style="font-size: 0;">

    <a target="_blank">

      <img

        src="IMAGE_URL"

        alt=""

        width="270"

        height="180"

        class="adapt-img"

        style="display: block; width: 100%; height: 180px; object-fit: cover; border: 0; border-radius: 8px 8px 0 0;"

      >

    </a>

  </td>

</tr>

Finally, upload the image you want to use through the Image block settings.

Uploading the card image in the Stripo editor

If several cards use the same layout, you don’t need to adapt each one manually. Add 2 cards to the same structure, duplicate that structure using the controls, and then replace the text and images with new content.

Duplicating the adapted structure for reuse

You might also like

How to add an HTML email background image to your email (code samples included)How to add an HTML email background image to your email (code samples included)

Wrapping up

We've now adapted the custom HTML so that Stripo can recognize its stripes, structures, containers, and blocks. This process makes it easier to work with the imported email in the visual editor, which enables you to edit content and copy, move, delete, or reuse adapted elements without rebuilding the template from scratch.

While some custom HTML may still require additional work, this approach gives you much more control over an imported template. If you run into any issues while adapting your own HTML, contact us at contact@stripo.email, and we'll be happy to help.

Turn your HTML into an editable email

Was this article helpful?

Tell us your thoughts

Thanks for your feedback!

4 comments

Carey Brown 1 month ago
Hello! Are there CSS elements added to the esd classes? I don't want to add these classes to my email modules and templates if it's adding CSS that I cannot control. I'm also concerned about the code weight these classes add to my emails when our system doesn't need them. Can you clarify? Thanks!
Roman Burdyga 1 month ago
Hello Carey, This set of classes is needed only when you are working in our editor and for marks for recognising your email structure. After export from Stripo editor, those classes will be removed from HTML.
Carey Brown 1 month ago
Thanks for your reply, Roman. If my client is using Stripo to store their modules, and build emails within the tool, the esd classes are required in the code base, correct? Otherwise the template and modules will not render.
Roman Burdyga 1 month ago
You're welcome. If the template or module doesn't have Stripo classes, it will render anyway, but the custom HTML but user won't be able to use drag-and-drop functionality.