Making email templates editable in Blocks Edit

Overview

The straight-forward Blocks Edit framework

The Blocks Edit editable framework is an HTML API based on classes, styles, and attributes. Below is an index of all the options available. See also: Thinking in Blocks, on how to think about your email template's various parts.

edit

To be used on individual HTML elements, making content within each editable. More Info →

block-edit
-block-edit: true
-block-edit: false

text

Disables content from being edited in an element.

block-no-text
-block-text: false

min/max characters

Sets a character limit for content in an element. Default: unlimited.

block-minchar-#
-block-minchar: #
block-maxchar-#
-block-maxchar: #

bold

Allows/disables adding 'strong' element around content. Default: bold allowed.

block-bold
block-no-bold
-block-bold: true
-block-bold: false

italics

Allows/disables adding 'em' element around content. Default: italics allowed.

block-italic
block-no-italic
-block-italic: true
-block-italic: false

link

Allows/disables adding 'a' element around content for linking. Default: linking allowed. More Info →

block-link
block-no-link
-block-link: true
-block-link: false

image

Allows/disables replacing an image. Default: replacing image allowed. More Info →

block-image
block-no-image
-block-image: true
-block-image: false

component

Stand-alone piece that can be added throughout a template. More Info →

block-component
-block-component: true

region

Group of elements and components that can be customized. More Info →

block-region
-block-region: true

repeat

Allows duplicating a region, making it part of a listing where each copy can be reordered or removed.

block-repeat
-block-repeat: true

remove

Allows a region to be removed.

block-remove
-block-remove: true

section

Areas of content stacked on top of each other that can be added in as part of a template's layout. More Info →

block-section
-block-section: true

Thinking in Blocks

What to take into consideration when making your template editable in Blocks Edit

Start with your last email

You don't need to build a new template or email. You can just use the last email you sent out as a starting point. You can always update your template to add functionality later.

Look for patterns

Find consistencies used in the design like layout pieces, repeating content formatting, headlines, buttons, etc. Then isolate them in your code. Blocks Edit works by copying and duplicating code that follows standard design and development practices.

Take apart the layout

Making things editable is essentially based on tagging parts to add functionality to. Blocks Edit Sections make up an email's layout, as modular parts stacked on top of each other. All defined sections are shown in the left sidebar and can be dragged in between other sections.

Gather elements

Blocks Edit Regions are used for repeating blocks of content within sections like listings of items. They are not added to the sidebar and are usually specific to a particular section's formatting. Blocks Edit Components are stand-alone pieces that can be used throughout a template, like buttons and headlines. They are also added to the sidebar to be dragged in anywhere there are other content pieces.

Add styling options

Sections, regions and components can have alternate versions, called Styles. This allows for switching out a different look for areas that contain the same kinds of content. For example, offering color options, but which are limited based on brand guidelines.

Make the text editable

Once you have the pieces for putting together an email, it's time to go into the individual text and images and enable them for editing. To do this, add the 'block-edit' class or style to containers directly around text and on images themselves. You can limit bold and italics options as well as the character count and even disable links from being added to certain text. It's also recommended that you use variable names in order to save content when templates need to be updated.

Content

Making pieces of text in an email template editable with Blocks Edit

edit

block-edit or -block-edit: true

To be used on individual HTML elements, making content within each editable.

Example

<div class="block-edit">Copy for a specific area of your email.</div>

text

block-no-text or -block-text: false

Disables content from being edited in an element.

min/max characters

block-minchar-# or -block-minchar: #
block-maxchar-# or -block-maxchar: #

Sets a character limit for content in an element. Default: unlimited.

bold

block-bold or -block-bold: true
block-no-bold or -block-bold: false

Allows/disables adding 'strong' element around content. Default: bold allowed.

italics

block-italic or -block-italic: true
block-no-italic or -block-italic: false

Allows/disables adding 'em' element around content. Default: italics allowed.

block-link or -block-link: true
block-no-link or -block-link: false

Allows/disables adding 'a' element around content for linking. Default: linking allowed.

For styling text links within content, Blocks Edit automatically picks up all link styles from the original template's sections and adds them as link options.

images

block-image or -block-image: true
block-no-image or -block-image: false

Allows/disables replacing an image. Default: replacing image allowed.

content variables

You can use dynamic email service provider variables throughout your template as you normally would.

Example

<div class="block-edit">Hello {{FNAME}},</div>

stored content

data-block="variable-name" or -block-var: 'variable-name'

Adding to HTML elements stores their content for each email. Works with style functionality to update content across each style version.

Example

<div class="block-edit" data-block="example-text">Copy for a specific area of your email that will be saved.</div>

Components

Adding functional elements for an email template with Blocks Edit

component

block-component or -block-component: true

Stand-alone piece that can be added throughout a template.

Example

<a href="#" class="block-component" style="background-color: #333333; padding: 5px 10px; color: #fff;" data-style="button">Call to Action</a>

style

data-style="variable-name" or -style-var: 'variable-name'

Multiple versions of a component that can be switched between.

Example

<a href="#" class="block-component" data-style="button" style="background-color: red; padding: 5px 10px; color: #fff;" data-style="button">Call to Action</a>
<a href="#" class="block-component" data-style="button" style="background-color: blue; padding: 5px 10px; color: #fff;" data-style="button">Call to Action</a>
<a href="#" class="block-component" data-style="button" style="background-color: yellow; padding: 5px 10px; color: #fff;" data-style="button">Call to Action</a>

Regions

Implementing customizable areas for an email template with Blocks Edit

region

block-region or -block-region: true

Group of elements and components that can be customized.

repeat

block-repeat or -block-repeat: true

Allows duplicating a region, making it part of a listing where each copy can be reordered or removed.

style

data-style="variable-name" or -style-var: 'variable-name'

Multiple versions of a region that can be switched between.

Example

<div class="block-region" data-style="header">
  <h1 class="block" style="text-align: left">Title Left</h1>
  <p class="block" style="text-align: left">Content Left</p>
</div>
<div class="block-region" data-style="header">
  <h1 class="block" style="text-align: center">Title Center</h1>
  <p class="block" style="text-align: left">Content Center</p>
</div>
<div class="block-region" data-style="header">
  <h1 class="block" style="text-align: right">Title Right</h1>
  <p class="block" style="text-align: left">Content Right</p>
</div>

remove

block-remove or -block-remove: true

Allows a region to be removed.

Sections

Enabling layout options for an email template with Blocks Edit

section

block-section or -block-section: true

Areas of content stacked on top of each other that can be added in as part of a template's layout.

style

data-style="variable-name" or -style-var: 'variable-name'

Multiple versions of a region that can be switched between.

Example

<div class="block-section" data-style="header">
  <h1 class="block" style="text-align: left">Title Left</h1>
  <p class="block" style="text-align: left">Content Left</p>
</div>
<div class="block-section" data-style="header">
  <h1 class="block" style="text-align: center">Title Center</h1>
  <p class="block" style="text-align: left">Content Center</p>
</div>
<div class="block-section" data-style="header">
  <h1 class="block" style="text-align: right">Title Right</h1>
  <p class="block" style="text-align: left">Content Right</p>
</div>

Start implementing your template for free Sign up