npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mike-email-builder

v0.0.1-beta.3

Published

Angular 20 email template builder using Syncfusion controls.

Downloads

409

Readme

Email Builder Angular Library

An Angular 20 compatible email template builder library that helps you create, customize, and manage responsive email templates using Syncfusion UI components.

Features

  • Drag and drop email blocks
  • Create responsive email templates
  • Customize text, images, buttons, dividers, spacers, and social blocks
  • Image gallery support
  • Template preview support
  • MJML-based email generation
  • Syncfusion-powered UI components
  • Angular 20 support

Installation

Install the package using npm:

npm install mike-email-builder

Install required peer dependencies:

npm install @angular/cdk @syncfusion/ej2-angular-popups @syncfusion/ej2-angular-navigations

Import the required Syncfusion styles in your project:

@import "@syncfusion/ej2-base/styles/material.css";
@import "@syncfusion/ej2-buttons/styles/material.css";
@import "@syncfusion/ej2-popups/styles/material.css";
@import "@syncfusion/ej2-navigations/styles/material.css";

Configuration

Import the email builder module and configure it using forRoot().

import { EmailBuilderModule } from 'email-builder';

@NgModule({
  imports: [
    EmailBuilderModule.forRoot({
      apiPath: 'https://api.example.com',
      uploadImagePath: '/upload/image',
      xApiKey: 'YOUR_API_KEY'
    })
  ]
})
export class AppModule {}

Basic Usage

Add the email builder component where you want to display the editor.

<email-builder></email-builder>

The builder will initialize with the default configuration.


Saving Template

You can get the generated email template using the builder service.

import { EmailBuilderService } from 'email-builder';

constructor(
  private emailBuilderService: EmailBuilderService
) {}

saveTemplate() {
  const template = this.emailBuilderService.getTemplate();

  console.log(template);
}

The returned template contains:

  • Email structure
  • Block configuration
  • MJML content
  • HTML output

Loading Existing Template

You can load a previously saved template.

loadTemplate() {

  const template = {
    id: 1,
    content: '<mjml>...</mjml>'
  };

  this.emailBuilderService.loadTemplate(template);

}

Preview Email

Open email preview using the builder service.

previewEmail() {

  this.emailBuilderService.preview();

}

The preview supports:

  • Desktop view
  • Mobile view
  • Responsive email rendering

Working With Images

The library provides image gallery support.

Open Image Gallery

this.emailDialogService.openImageGallery();

Select Image

this.emailDialogService.selectImage(
  'https://example.com/image.png'
);

The selected image will automatically update the image block.


Custom Configuration

You can customize available blocks.

Example:

EmailBuilderModule.forRoot({

  blocks: [
    'text',
    'image',
    'button',
    'divider',
    'spacer',
    'social'
  ]

});

Block Types

The builder supports the following blocks:

Text Block

Used for creating text content.

Example:

{
  type: 'text',
  content: 'Welcome to our service'
}

Image Block

Used for adding images.

Example:

{
  type: 'image',
  src: 'https://example.com/logo.png'
}

Button Block

Used for creating CTA buttons.

Example:

{
  type: 'button',
  text: 'Click Here',
  url: 'https://example.com'
}

Divider Block

Used for adding separators.

Example:

{
  type: 'divider'
}

Spacer Block

Used for adding spacing between sections.

Example:

{
  type: 'spacer',
  height: '20px'
}

Social Block

Used for adding social media links.

Example:

{
  type: 'social',
  networks: [
    {
      name: 'facebook',
      url: 'https://facebook.com'
    }
  ]
}

Export HTML Email

Generate final email HTML:

const html =
  this.emailBuilderService.exportHTML();

console.log(html);

The generated HTML can be used directly with email providers.


Export MJML

Generate MJML content:

const mjml =
  this.emailBuilderService.exportMJML();

console.log(mjml);

MJML can be converted into responsive HTML email format.


API Configuration

| Property | Description | | --------------- | ---------------------- | | apiPath | Base API URL | | uploadImagePath | Image upload endpoint | | xApiKey | API authentication key |

Example:

{
  apiPath: "https://api.example.com",
  uploadImagePath: "/images/upload",
  xApiKey: "API_KEY"
}

Events

Subscribe to builder events:

this.emailBuilderService.templateChanged$
.subscribe(template => {

  console.log(template);

});

Available events:

  • Template changed
  • Block selected
  • Image selected
  • Template saved

Responsive Mode

The builder automatically supports:

  • Desktop email layout
  • Tablet layout
  • Mobile email layout

Use preview mode to validate responsive behavior before exporting.


Browser Support

Supported browsers:

  • Chrome
  • Edge
  • Firefox
  • Safari

License

MIT License