Learn how to create a custom blocks for reusable design elements in your email and page designs.
Topics covered in this article:
Blocks are essentially small pieces of code that can be dropped into your Modern Editor designs. When a block is dropped into an email or page, it becomes a part of that design. Once placed, you can make additional edits, like changing text, swapping images, or fine-tuning styles.
There are two types of blocks you can use in your designs. You can use WordFly Blocks or Your Blocks. In Modern Editor, you will access these using the Blocks toggle at the top of the edit content panel (left side of the editor).
WordFly Blocks are the default building blocks in Modern Editor and include single blocks, container blocks, and grouped blocks. These blocks include image or text blocks, divider blocks, and column blocks. Access default blocks in Modern Editor by selecting the WordFly symbol from the Blocks toggle.
Your Blocks can include your own content, images, and styles. These blocks are created under Design Library > Blocks using the Blocks Editor. When you use one of Your Blocks, the dropped code is a snapshot in time from when it was last saved in the Blocks Editor. Access Your Blocks in Modern Editor by selecting the block symbol from the Blocks toggle.
You will be able to find your recently-saved Block in the Your Blocks section of Modern Editor:
Blocks can make email and page building faster. They will help streamline your process with consistent branding across your emails and pages. Blocks are perfect for things like banners, footers, and other elements you want to reuse in your designs.
The Blocks Editor is not the place to build your email or page. When considering whether to build a custom block, think about reusability. If the block you want to build is for a very specific use case, chances are that you will only need it once. Try keeping only those blocks that you know you will use often.
What to expect
- Custom Blocks are built in the Blocks Editor under Design Library > Blocks.
- Use Blocks to build repeating design elements that will be used across email or page designs. For example, if you are using Pages, save time by building your banner as a custom block that can be easily dropped into every page on the fly.
- When one of Your Blocks is dropped into an email or page, it becomes a part of that design. The dropped code is a snapshot in time from when it was last saved in the Blocks Editor.
- Custom blocks you create will appear in the Your Blocks section of Modern Editor. Use the blocks toggle switch between Your Blocks and WordFly Blocks.
- Blocks display alphabetically by file name. If you want to give your block a “friendly name,” click on the gear icon in the Blocks Editor and enter it in the Block Name field (62-character limit).
- Custom blocks will act as a grouped block once dropped in a design. This can be adjusted by ungrouping the block in Modern Editor.
- Custom blocks are delimited by a container by default. Adding more containers can lead to alignment issues or extra spacing. Avoid them, if possible, for more flexibility.
- For the most flexibility, we have not set a pixel width for the block's container. It is set at 100% to fill the width of the design it is placed into.
- In the block’s container, it’s better to keep left and right margin values at 0. You can control that spacing, if needed, after it is placed into your design.
- When building a custom block, your goal should be to match your ideal design 90-95% when it is dropped into a design. Learn more about Block Styles in the next section.
- Note: If you duplicate a block, change the display name in block settings. Click on the cog icon in the Blocks Editor to update the name.
1. Go to Design Library > Blocks.
2. Click the button Create a block button.
3. The Blocks Editor will open and you can start building a custom block.
Start working on your block design in the Blocks Editor. Drag-and-drop blocks from the left side of the Blocks Editor to the right side of the editor. The process is similar to building an email or page design in Modern Editor; but, remember, here you are designing a single block or group of blocks to re-use it.
Example of footer block built in the Blocks Editor,
4. Make sure to Save your design frequently.
Test the Block in Modern Editor
We recommend going into your design and dropping in your Block as you are designing it. This will help you see how your Block interacts with the design's settings and styles. You can open a separate tab with your email or page design open in Modern Editor; then, drag-and-drop your Block to the design to see how it works.
When building a custom block, your goal should be to match your ideal design 90-95% when it is dropped into a design. Why not 100%? When you drop your block into a design, preset styles from the email or page could affect its design. This is an expected part of how CSS works. You can use this to your advantage. When building your block, ask yourself:
- Do you need a flexible block that will adapt to multiple designs? Set fewer styles.
- Do you need a rigid block that will look nearly the same in every design? Set more specific ones.
Keep in mind that you will likely need to make small adjustments when placed in your email or page, depending upon how the block is built.
You can edit your Block in the Blocks Editor when you want to make changes to the custom Block that is dropped into designs. These changes do not update the Blocks added to existing designs.
Of course, you can also edit your dropped Block in Modern Editor. Change the styles and the content as needed. These changes do not update the Block in the Blocks Editor.
Group or Ungroup custom block
In Modern Editor, dropped Blocks will be grouped by default, meaning it will act as a single block where you can edit all the information at the same time in the left side panel.
If you prefer to have more granular control over the Block styles, you can ungroup them in a couple ways.
Click on the custom block from the preview panel (right side). From the edit content panel (left side), scroll down to the bottom of the block and click Group/Ungroup.
Or, from the preview panel (right side), hover over your Custom block and right click. Select Ungroup from the options.
You can delete your custom Block if you no longer wish to use it.
1. Go to Design Library > Blocks.
2. Click on the name of your block and select Delete.