Skip to main content

Custom Blocks

Create reusable email and landing page components using simple form inputs instead of HTML.

Note: This feature is currently in Beta testing. For any questions about this feature or to participate in the Beta program, contact Grace Lee at grace.lee@knak.com.


What Are Custom Blocks?

Custom Blocks are reusable content sections for emails and landing pages. You define the layout once. You reuse it across assets.

Instead of editing HTML, you fill in fields like text, links, or drop-downs.

Key Benefits

  • Reuse consistent layouts across campaigns

  • Prevent HTML editing errors

  • Speed up content creation

  • Customize content using simple inputs

The Custom Blocks feature is a paid add-on. Contact your Knak Customer Success Manager (CSM) or the Sales team to learn more.


Demo Video


Create A Custom Block

Create a Custom Block for your marketing team to reuse.

Open Custom Blocks

  1. Go to Admin.

  2. Select Custom Blocks from the left navigation.

  3. Click Create Custom Block.

    Custom Blocks page in the Admin section showing existing Custom Blocks and the Create Custom Block button.

Create the Default Version (Required)

The default version serves as the fallback version of the Custom Block. It is used whenever an integration-specific variant is not available.

  1. Enter the following information:

    • Name

    • Description

    • Custom HTML

  2. Click Add Variable.

    Add Variable dialog showing fields for variable name, label, type, and default value.
  3. Enter the following information:

    • Name

    • Label

    • Type

      • Text Input

      • Text Block

      • Dropdown

    • Default Value

    Example variable configured for the Select Recommendation Source Custom Block.
  4. Click Create to save the variable.

    Example variable configured for the Select Recommendation Source Custom Block.
  5. Repeat these steps for any additional variables.

Configure Integration-Specific Variants (Optional)

You can create integration-specific versions of a Custom Block when additional code or syntax is required for a specific marketing automation platform.

  1. Open the integration-specific variant you want to configure.

    Integration drop down menu when configuring custom blocks.
  2. Update the HTML for the selected integration.

  3. Save your changes.

Integration-specific variants use the same variables as the default version.

Example Use Cases:

  • The default HTML might use standard inline styles

  • A Marketo variant might include Marketo-specific tokens or tracking scripts

  • A HubSpot variant might use HubSpot module syntax

Save the Custom Block

Click Create Custom Block.

The Custom Block is now available to use in emails, landing pages, modules, and themes.


Add A Custom Block To An Asset

Add a Custom Block directly from the builder.

  1. Drag a Custom Block element into your email or landing page

  2. View the selection modal

  3. Search or browse available blocks

  4. Select a custom block and click Select Block.

    Custom Block selection modal showing available Custom Blocks to add to an asset.
  5. After selection, the block loads on the canvas with a preview.


Edit Custom Block Content In An Asset

You edit content in Custom Blocks by using fields. You do not edit HTML.

Open Block Settings

  1. Click the Custom Block on the canvas

  2. Open the right-side panel

Update Block Variables

Each field maps to a variable created by your admin.

  • Text input → Single-line text

  • Text Block → Multi-line text

  • Dropdown → Select from options

Custom Block settings panel displaying editable variable fields.

Preview Your Custom Block

Knak updates the Custom Block preview as you edit its fields.

Real time preview changes when adjusting block variables.

Preview Behavior

Keep these differences in mind when reviewing your preview:

  • The preview uses the default HTML version.

  • Integration-specific versions do not appear in the preview.

  • The final output may differ after syncing to your integration.

  • Knak sanitizes the HTML used to generate the preview.

Because the preview and final output are processed differently, always test your final output before sending or publishing.

How Preview Sanitization Works

Knak uses HTMLPurifier to sanitize Custom Block HTML for the preview. This helps the preview render safely while preserving supported formatting.

This sanitization applies to the preview. It does not modify or sanitize the Custom Block HTML that you save or use in the final output.

Preview sanitization supports common attributes, including:

  • style, class, id, lang, and dir

  • Alignment, size, title, and background attributes

  • Table and cell attributes

  • Image attributes, such as src and alt

  • Link attributes, such as href and target


Test Your Custom HTML

Knak does not validate, correct, or sanitize the Custom Block HTML that you save for final output.

Before You Send or Publish

  • Check your HTML for syntax errors.

  • Review your Custom Block in Knak.

  • Test your email or landing page in its final environment.

  • Test any integration-specific version you use.

  • Fix HTML issues before sending or publishing.

Note: If your HTML contains a syntax or code error, Knak keeps the code as entered. The preview may not show exactly how that code will behave in the final output.

Preview sanitization does not mean that Knak validates, corrects, or sanitizes the HTML used in your final output.

Your team is responsible for reviewing and testing the HTML used in your Custom Blocks.


How Content Is Stored

Your inputs are saved inside the asset. They are not stored separately.

What This Means

  • Values are stored as structured data

  • Data stays tied to the block in your email

  • Each block instance can have different values


Need more help? Contact support via live chat using the chat bubble in the bottom right corner or email support@knak.com.

Did this answer your question?