Use the developer mode for advanced customization of email designs

The developer mode in the Drag & Drop email editor offers advanced customization with greater flexibility and control over your email designs. It is made for those who want to add custom code customization such as changing bullet point colors or displaying a different font size or color for emails read on mobiles. 

What is the developer mode?

The developer mode is a YAML code editor integrated into the Drag & Drop email editor. It gives you control over your email templates, allowing you to perform actions that are not supported by the Drag & Drop email editor interface. Note that not all CSS properties are supported inside the developer mode.

➡️ Discover our most frequent developer mode use cases for advanced email customization!

developer-mode_EN-US.png

Good to know

  • All changes made inside the developer mode are automatically saved. If there's an error inside your code, an error message will display and your changes will not be saved.
  • The developer mode opens on the left of your screen, allowing you to see your changes in real-time in your email design. You can expand or close the developer mode at any time by hovering your mouse over it and clicking on the corresponding icon in its top-right corner:
    dvlp-mode_expand-close_EN-US.gif
  • To avoid the need to scroll the developer mode to find content, you can quickly search for content by pressing Ctrl or ⌘ + F and typing it into the search bar.
  • Test your emails before scheduling them to ensure all the changes you've made inside the developer mode are working correctly.

</> Access the developer mode

To access the developer mode:

  1. Create an email campaign or template and access the Design step. 
  2. Choose the Drag & Drop Editor to create your email design.
  3. From the Drag & Drop Editor header, click the three-dot icon > Developer Mode. An information modal opens.
  4. (Optional) Check the Do not show again box if you do not want to see the information modal the next time you open the developer mode. 
  5. Click Open developer mode.Screen_Shot_2020-04-21_at_09.26.35.png

The developer mode opens on the left of your screen, showing real-time edits on your email design to the right of your screen. All your changes are automatically saved. Once you are done with the developer mode, you can close it and return to the design mode. 

Common use cases of the developer mode for advanced customization

To help you understand the power of the developer mode in the email editor, we have listed our most frequent developer mode use cases for advanced email customization. Open the accordions below to find out how to take advantage of the developer mode:

🔤 Set a different font size, family, or color for mobile mode

Set different font styles for mobiles to ensure readability and visual appeal:

  • Use a smaller font size to fit content on smaller screens,
  • Use a safe font family for better readability, and
  • Adjust font color to ensure good contrast in diverse lighting conditions or for dark-mode settings.
Email on desktops Email on mobile devices
dvlp-mode_desktop_EN-US.jpeg dvlp-mode_mobile_EN-US.jpeg

To change your font size, color, or family for mobiles, you will need to set the font styles for both mobile and desktop: 

  1. Design your email. 
  2. Access the developer mode
  3. Search for the content for which you want to change the font styles. Your content settings are just above it in the code. 
  4. Copy the codes corresponding to the type of style you want to change on mobile devices: 
    • Text font: font-family: 'font family name'
    • Text size: font-size: SIZEpx
    • Text color: color: 'HEX' 
  5. Under the layout string and 320px value, paste the codes you copied above to edit the mobile font styles and replace their value with the one you need:
    • font-family: 'font family name' where font family name is the name of the font as it appears in the list of available fonts in the editor
    • font-size: SIZEpx where SIZE is the size you want to give to your content in px. 
    • color: 'HEX' where HEX is the HEX code corresponding to the color you want to give your content. 
      dvlp-mode_font-changes_EN-US.png
  6. From the content string, in our example 3 tips to practice safe yoga, remove any style, span, or class attributes between the single quotes '' to only keep your content.
    ➡️  For example
    If your content string is: 
    content: '<h2 class="default-heading2"><span style="color:#116b6b;">Our 3 tips to practice safe yoga 🧘</span></h2>'
    Remove any style or class attributes to only keep your content, such as: 
    content: 'Our 3 tips to practice safe yoga 🧘'
  7. Switch between the desktop desktop-mode.png (⇧ + D) and mobile mobile-mode.png (⇧ + M) modes using the corresponding icons at the top-right of your email editor. This will allow you to ensure that your font styles change according to the type of device on which they are read:
    dvlp-mode_switch-modes_EN-US.gif
  8. Make other changes in developer mode if necessary.  
  9. Click the cross icon close-dvlp-mode.jpeg to close the developer mode.

Congratulations! Your font styles are now changing depending on the device on which they are read. 

🎠 Add Gmail annotations (deal, image, or product carousel preview in inboxes)
❗️ Important
To display Gmail annotations to your Gmail recipients, you first need to register with Google. Annotations may not appear for all Gmail recipients due to factors like quality filters and frequency limits. Annotations are only visible in the Promotions tab of Gmail. 

Gmail annotations allow Gmail users to view and engage with your promotions directly from their inbox by clicking the annotated image or text without opening the email. These annotations allow messages received in Gmail's Promotions tab to stand out by adding features such as:

  • Deal annotations
  • Product carousels
  • Single image preview

dvlp-mode_gmail-annotation_EN-US.png

To display Gmail annotations to your recipients: 

  1. Design your email. 
  2. Access the developer mode
  3. Copy the code from the tab below corresponding to the type of annotation you want to display to your Gmail recipients: 
    Deal annotations Product carousels Single image preview

    Code to copy

    Values to replace
    promo:
    -
    @context: 'http://schema.org/'
    @type: DiscountOffer
    description: DESCRIPTION
    discountCode: DISCOUNT_CODE
    availabilityStarts: START_DATE_TIME
    availabilityEnds: END_DATE_TIME
    • (Optional) DESCRIPTION is the text that displays with the deal badge, such as 20% off
    • (Optional) DISCOUNT_CODE is the discount or promotion code for the offer, such as 20TODAY
    • (Optional) START_DATE_TIME is the date and time when the offer begins in ISO 8601 format, such as 2023-09-25T18:44:37-07:00.
    • (Optional) END_DATE_TIME is the end date and time of the promotion in ISO 8601 format, such as 2023-09-25T18:44:37-07:00.
  4. At the top of the developer mode, under the fonts value and at the first level, paste the code you copied from one of the tabs above.
  5. Make other changes in developer mode if necessary.
  6. Click the cross icon close-dvlp-mode.jpeg to close the developer mode.
  7. (Optional) Send a test email to a test email address using Gmail and with the Promotions tab active, to ensure the Gmail annotation displays correctly.

Alternatively, you can use our HTML editor to display Gmail annotations. To learn more, check Google's official documentation

🎨 Change the color of bulleted and numbered lists

Changing the color of your bullets or numbers can be useful to emphasize key points, group ideas, or match your branding. Below is an example of what a colored bulleted list looks like: 

dvlp-mode_bullet-points_EN-US.png

💡 Good to know
When changing the color of your bullets or numbers, the text associated with them will automatically inherit their color. However, you will be able to change the color of your text outside the developer mode after applying your bullet color.

To change the color of your bulleted and numbered lists:

  1. Create a list of items with bullets or numbers. 
  2. Access the developer mode
  3. Search for the list you've just created in the developer mode and spot the content value corresponding to it. Your content settings are just above it in the code. 
  4. Under the default value, paste the following code where HEX is the HEX code corresponding to the color you want to give your list: color: '#HEX'
    dvlp_paste-bullet_EN-US.png
  5. Check your email design on the right of your screen to see if your list of items has changed color. Your bullets or numbers and associated text should appear in the color that corresponds to the HEX code you entered in the developper mode. 
  6. Make other changes in developer mode if necessary. 
  7. Click the cross icon close-dvlp-mode.jpeg to close the developer mode.
  8. To change the color of your text while keeping the color of your bullets or numbers:
    1. Select the text you want to change the color of. 
    2. From the toolbar above your text, click the Font color icon.
      dvlp-mode_change-text-color_EN-US.png
    3. In the HEX field, paste the HEX color code you want to give your text. In our example, #
      3B3F44

Congratulations! You have changed the color of your bullet points or numbers. 

↪️ Add non-breaking spaces or hyphens

Non-breaking spaces and hyphens ensure proper formatting in email designs by preventing undesirable line breaks, such as a compound name or item price being split, and maintaining readability across devices. Check our example below to understand the importance of non-breaking spaces and hyphens:

Without non-breaking characters With non-breaking characters
dvlp_breaking_EN-US.jpeg dvlp_non-breaking_EN-US.jpeg

To insert non-breaking spaces and hyphens into your email design: 

  1. Design your email. 
  2. Access the developer mode
  3. Search for the content to which you want to add a non-breaking space or hyphen. Your content settings are just above it in the code. 
  4. Copy the code corresponding to the type of non-breaking character you want to include:
    • Non-breaking space: &nbsp;
    • Non-breaking hyphen: &#8209;
  5. Paste the code copied above in place of the space or hyphen you want to make non-breaking.
    dvlp_add-nonbreaking_EN-US.jpeg
  6. Check your email design on the right of your screen to see if your list of items has changed color. 
  7. Make other changes in developer mode if necessary. 
  8. Click the cross icon close-dvlp-mode.jpeg to close the developer mode.

Congratulations! You have added non-breaking characters to your email design. 

🏞️ Fix background image and text blocks rendering issues on Outlook

Outlook desktop versions using the Microsoft Word rendering engine have limited CSS support (e.g., Outlook 2007, 2010, 2013, 2016, and Office 365 desktop versions). Background images and text formatting often display incorrectly, showing white backgrounds instead of images and misaligned text due to poor handling of properties like background-image and line-height.

To ensure background images and text blocks render properly in Outlook, use the following workaround:

  1. Design your email. 
  2. Retrieve the height size in px of your background image. In our example, 265px. 
  3. Access the developer mode
  4. Click the tab corresponding to the rendering issue you want to solve:
    Background image Text block
    ❗️ Important
    This workaround only works for background images applied on body width, not full width, and under a grid-row value. Note that a grid-row value should not contain any button.
    1. Search for the grid-row value corresponding to where your background-image is displayed.
    2. Under the background-image value, enter height: followed by the height size in px of your background image. In our example, we will enter height: 265px.
      dvlp-mode_bckg-image_EN-US.png
  5. Make other changes in developer mode if necessary. 
  6. Click the cross icon close-dvlp-mode.jpeg to close the developer mode.
  7. (Optional) Send a test email to a test email address using one of the Outlook versions that do not support background images to ensure it displays correctly.
🤖 Add alt-text to social media icons

Add alt-text to your social media icons in your email designs to improve accessibility for visually impaired people using screen readers, enhance user experience, and ensure context is clear if images don’t load.

To add alt-text into your email design: 

  1. Design your email and include your social media icons.
  2. Access the developer mode
  3. Search for the type: social-media values. There should be one for each social media icon. Your content settings are just above it in the code. 
  4. Under each type: social-media value, search for the alt: null value.
  5. Replace null with your alt text. In our example, our website icon alt text will be The Green Yoga website, and our Instagram icon alt text will be Instagram account
    dvlp-mode_alt-text_EN-US.jpeg
  6. Make other changes in developer mode if necessary.  
  7. Click the cross icon close-dvlp-mode.jpeg to close the developer mode.
  8. (Optional) Send a test email to check that your alt-text is displayed correctly for each of your media icons.
📦 Display a list of items according to their status

Display a specific list of content (image, title, text, section etc.) only when conditions within the section are met. This is very useful when you only want to display a list of items if it contains your desirable elements.

For example, you could create a shipment confirmation email that includes separate lists for shipped and back-ordered items.

This email would contain:

  • A list with the items that were shipped.
  • A list with the items that are back-ordered and will be shipped later.

➡️ To learn more about how you can display a list of items according to their status, check our dedicated article Show or hide content based on repeatable content.

sample_email.png

If you want to go further into the customization of your email designs with the developer mode, check our technical documentation for our templating language and see all the actions available:

❓ FAQs

Can I use HTML in the Developer mode?

As opposed to what you may have thought, you cannot directly type HTML in the Developer mode. Instead, you should use YAML which is an easy representation for a tree structure similar to JSON.

With this language, you will use abstract definitions created by our team to make developing templates easy and to ensure the HTML generated and sent to the customers is managed by our tools. This allows for the best quality and wide support for email clients.

Why can't I edit the HTML directly?

As you might know, email clients are not all the same and it can be difficult to create professional-looking newsletters that work everywhere, including on mobile phones and in Outlook.

This is also a standard work in progress as new email clients come and old clients change the way they render emails.

This is why we are working hard to make sure your emails will work as expected everywhere, with minimal effort on your side. We have created an abstract high-level way for you to define your HTML and we do the magic behind the scenes. 

Are there any limitations in the Developer mode?

For 99% of the use cases, you will rarely find any limitations with our templating language since we work constantly on updating it, but of course, there might be a few quirks or client-specific features that we may have missed. This opens up a new world of possibilities beyond what we offer in the interface. Discover our most frequent developer mode use cases for advanced email customization!

⏭️ What's next?

🤔 Have a question?

If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.

If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo expert partner.

💬 Was this article helpful?

5 out of 10 found this helpful