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

angular-email-craft

v1.2.0

Published

Angular email editor and Angular email template builder, an embeddable, drag-and-drop WYSIWYG for modern web applications. Drop-in for angular-email-editor and an Unlayer alternative.

Readme

angular-email-craft

npm version license

A white-label drag-and-drop email editor for Angular, a drop-in for angular-email-editor and a developer-friendly Unlayer alternative. The editor loads from a hosted iframe, so no editor code ships in your bundle (~3 KB), and your backend renders send-ready, email-safe HTML + MJML via email-craft-sdk.

Install

npm install angular-email-craft

Usage

import { Component, ViewChild } from "@angular/core";
import { EmailEditorComponent } from "angular-email-craft";

@Component({
  standalone: true, imports: [EmailEditorComponent], template: `
    <button (click)="save()">Save</button>
    <email-editor #editor token="pk_live_your_key" style="height: 100vh"></email-editor>
  `
})
export class AppComponent {
  @ViewChild("editor") editor!: EmailEditorComponent;

  save() {
    this.editor.editor?.exportHtml(({ design, html }) => {
      // store `design` (JSON) + `html` (email-safe HTML)
    });
  }
}
  • Get a publishable pk_live_… token from your MailKaro dashboard (free tier includes the full editor).
  • The component.editor handle mirrors angular-email-editor / Unlayer: loadDesign, saveDesign, exportHtml, setMergeTags, …
  • Exports called without a callback return a promise: const { html } = await editor.exportHtml(). registerCallback takes Unlayer's image (upload; done({ error }) on failure), selectImage (your own image library) and previewHtml (change what Preview shows).
  • Unlayer's displayConditions option and setDisplayConditions work (a row picker; the chosen before / after wrap the row in the export), and so does features.textEditor.customButtons (onAction({ text }, done) runs on your page).
  • Custom tools: editor.registerTool({ name, label, options, values, renderer: { Viewer: editor.createViewer({ render }), exporters: { email } } }) (Unlayer's call, e.g. in (ready)). The tool shows in the Content panel; its code runs on your page and each block keeps its exported HTML, so exports do not wait for it. Tools are registered again when a changed input re-mounts the editor. See Custom tools.
  • Outputs: (load) / (ready) (with the handle), (updated), and (error) when the editor is not running as it was set up ({ code, message }: invalid_embed_token, domain_not_allowed, token_expired or runtime_unreachable (the editor then runs on the free plan), or editor_not_started (the frame did not answer in 20 seconds: a wrong embedUrl, or the frame was refused)). An EmailEditorModule is also exported for NgModule apps.
  • Inputs: token, embedUrl, runtimeUrl, apiBaseUrl, project, displayMode (email | web | popup | document), mergeTags, design, minHeight, fonts, inboxPreview (false hides the Gmail / Apple Mail preview), connectorHeaders, s3, googleDrive, locale, and onImageUpload (a function that uploads in your app and resolves { url, alt? }). Changing token, displayMode, inboxPreview, fonts or another mount-time input re-mounts the editor; mergeTags updates live.
  • The package is published with Angular partial compilation (Angular 17 to 22, AOT and JIT). Server-side rendering is safe: the editor mounts only in the browser.

Building a PDF, letter, landing page, or popup

displayMode picks the canvas type: "email" (default, email-width), "document" (US Letter, use this for PDFs and printed letters), "web" (landing pages), "popup" (narrow modals). For PDFs or letters you also want [inboxPreview]="false" so the Gmail / Apple Mail preview strip is hidden.

<email-editor token="pk_live_..." displayMode="document" [inboxPreview]="false"></email-editor>

Learn more