Customizing an HTML Email Template

When you export your HTML template to eSputnik, simply pasting the code in the code editor is not enough. This way you won’t be able to edit elements (container/structure/stripe) and blocks in a drag-n-drop mode. To take full advantage of the eSputnik editor, the template needs to be optimized using its functionality.

Basic Customization

Apply basic customization if you don’t need to change the layout but only want to edit the content: text, links, images.

For this instruction, we'll copy the HTML template of the email by Wemo from reallygoodemails.com, paste it to our editor and adapt step by step. You can paste your own HTML template or take it from any other email template resource.

  1. In your eSputnik account, go to Messages → Messages and click Create Email. In Basic, scroll down and select My HTML. Paste the code in the editor.
eSputnik code editor with the Wemo HTML email code pasted into the code panel below the email preview
📘

Note

This flow expects the HTML code pasted directly into the editor — there's no separate form for uploading an HTML, MJML, or ZIP file.

📘

Note

An email message includes a plain-text and an HTML version, and can also include an AMP version. The plain-text version is generated automatically from the HTML version, and mailbox providers require its presence. Its appearance in the message source is standard behavior, not injected foreign code.

  1. The editor has a CSS section. Click CSS in the right corner to unroll it.
Code editor with the CSS tab highlighted in the bottom right corner, indicated by a red arrow
  1. For convenience, we recommend splitting HTML and CSS snippets between the corresponding sections. CSS styles are often wrapped within the <head> of the HTML code.
    For example:
HTML code editor with a style block highlighted in blue, showing CSS rules nested inside the head section

You need to cut everything wrapped between **

<style>
</style>

** tags and paste it to the CSS section.
This is how it will look after splitting:
HTML section

HTML code panel showing the email markup after the style block was removed, with the CSS panel now empty and the header images broken in the preview

CSS section

CSS section of the code editor showing the ReadMsgBody, ExternalClass, and body style rules moved into it
  1. The images aren’t displayed so you need to add them manually. You can do it in the code editor or block editor.

To add an image in the block editor, close the code editor, click the container with the image and click the Change image icon in the settings on the left.

Image block settings panel with the Change image icon highlighted in red, and an arrow pointing to the broken logo placeholder in the preview

Upload the image in one of the ways:

  • Upload the image from the computer;
  • Paste it as the external link.

Repeat the same process for the rest of the images. Once all images are added, click View message in the top settings to preview the template on desktop and mobile.

Editor toolbar with the View message tooltip shown and the preview icon highlighted in red
  1. To edit text, you need to apply the esd-text CSS class to the tag that wraps the entire text block. Usually, these are p, div, td, h1, h2, h3, span tags. You can apply the esd-text class to the span tag only if it wraps the entire text and not a part of it.
Preview text block highlighted in blue with an arrow pointing to the esd-text class added in the HTML code

After the esd-text class is set, click the text container in the template and edit it as needed using the editing toolbar that rolls out on top.

Advanced Customization

You’ll need advanced customization when you need to change the layout of the email: edit stripes, structures or containers.

For a better understanding of the process, let's see what elements the email template consists of in the eSputnik editor.

HTML Hierarchy

In the eSputnik drag-and-drop editor, emails consist of:

  • stripes;
  • structures;
  • containers;
  • blocks.

A stripe is the highest element of HTML elements that can nest several structures. Structures can nest containers, and containers can nest blocks.

Take a look at the example of a stripe that nests one structure with two containers and blocks Image and Text.

HTML code with the stripe, structure, container, and image/text block elements numbered 1 to 4
  1. Stripe with the esd-stripe class.
  2. Structure with the esd-structure class.
  3. Container with the esd-container-frame class.
  4. Block with the esd-block class.

If your template has a similar HTML layout, it will be easier to customize it in eSputnik.
There is always a space for a new stripe, structure or container. But due to the specific layout of the blocks, it is not always possible to add a class for them ensuring proper customization. We recommend wrapping a new block with the esd-block-html class. This way, you’ll be able to activate control buttons (Save as module, Move, Copy, Delete) and edit such a block in HTML.

Available block classes

  • esd-block-image – class for the Image block;
  • esd-block-text – class for the Text block;
  • esd-block-button – class for the Button block;
  • esd-block-spacer – class for the Spacer block;
  • esd-block-social – class for the Social block;
  • esd-block-html – class for the HTML block;
  • esd-block-menu – class for the Menu block.

Customize the Stripe

Find the snippet you can apply a stripe class to. In our template, it’s the entire email body.

Email body highlighted as a Stripe element with the esd-stripe class highlighted in red in the code editor

After adding the class, eSputnik identifies the HTML snippet as a stripe and displays the stripe settings on the left. Use them to edit the stripe.

Customize the Structure

Apply the esd-structure class to the structure.

Structure settings panel with the Structure label on the canvas and the esd-structure class highlighted in red in the code editor

The side panel with settings will appear on the left.

Customize Basic Blocks

Now let's put the existing content within blocks and containers. The upper part of the email contains a picture (white structure), logo and text. Let's apply the corresponding classes to them:

Logo and image – esd-block-image.

Wemo logo image in the preview with an arrow pointing to the esd-block-image class highlighted in the code

Text – esd-block-text.

Brighten up your holidays with Wemo heading in the preview with an arrow pointing to the esd-block-text class in the code

After customization, this section will look as follows:

Email preview showing the Wemo logo, heading, and holiday-themed photo after applying the image and text block classes

Customize the Container

To customize the product card with the button, we need to add a container. Find the snippet nesting the product photo with the alt text Wemo Mini and apply the esd-container-frame class to it. This will be the first container.

Wemo Mini product image and Buy Now button in the preview with the esd-container-frame class highlighted in red in the code

Within the container, add the esd-block-image class to the image.

Wemo Mini product image in the preview with an arrow pointing to the esd-block-image class in the code

Find the second snippet with the Wemo Mini text and apply the esd-container-frame class to it.

Wemo Mini heading and Buy Now button in the preview with an arrow pointing to the second esd-container-frame class in the code

Code in the first and second sections of the esd-container-frame snippets is nested within the blocks.

Code editor showing the text block and Buy Now button block numbered 1 and 2, nested within the container's HTML

Text and a button are the only content of this container. Apply the esd-block-text class to the first section and the esd-block-button class to the second section.

Wemo Mini text in the preview with an arrow pointing to the esd-block-text class in the code
Buy Now button in the preview with an arrow pointing to the esd-block-button class in the code

Transform the remaining HTML using this method. You don’t have to adjust each card manually. Customize one structure with containers and then duplicate it or its containers with the Copy button.

Container toolbar icons shown above the Wemo Mini product image, including the copy icon used to duplicate the container

Now you know how to customize your own HTML template and edit text, images and links in the eSputnik editor. Note that after editing you can save the whole template to your template library. You can also save its separate sections as synchronized modules.


Did this page help you?