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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@send-with-ses/ng-email-designer

v0.5.7

Published

Design responsive HTML emails that work in every email client. Fast and light weight.

Downloads

234

Readme

Angular Email Designer

This library was generated with Angular CLI version 15.2.0.

Installation

Install via NPM:

npm install @send-with-ses/ng-email-designer

Or via YARN:

yarn add @send-with-ses/ng-email-designer

Live Demo

Check out the live demo here: https://designer.sendune.com (Source Code)

Initialization

Import the Email Editor module in your app's module.

app.module.ts


import { EmailEditorModule } from "email-designer";
...

@NgModule({
  ...
  imports: [ EmailEditorModule ],
  ...
});

app.component.ts

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

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
})
export class AppComponent {

  @ViewChild(EmailEditorComponent)
  private emailEditor: EmailEditorComponent;

  selectedTemplate: TemplateBean;
  selectedTemplateType = '';

  // To get the HTML output of the template
  exportHtml() {
    console.log(this.emailEditor.exportHtml());
    this.emailEditor.showHtmlPreview();
  }

  preview() {
    this.emailEditor.showPreview();
  }
}

app.component.html

<div class="container">
  <button (click)="exportHtml()">Export</button>
  <lib-email-designer [type]="selectedTemplateType" [template]="selectedTemplate" #emailEditor></lib-email-designer>
</div>

Documentation

We support 3 types of Templates

  1. SENDUNE Designer (ses_designer)
  2. HTML Editor (html_editor)
  3. Plain Text (plain_text)

Pass the relevant template type as 'selectedTemplateType' to use it.

Image Handling

Images can be directly uploaded to a cloud storage of your choice (ex: AWS S3, Cloudflare R2, GCP Cloud Storage etc).

<lib-email-designer [type]="selectedTemplateType" [template]="selectedTemplate" #emailEditor class="px-0"
        (imageSelectionTriggered)="onImageSelectionTrigger($event)"
        (imageUploadTriggered)="onImageUploadTrigger($event)"
        (emailContentChanged)="onEmailContentChange($event)"
        ></lib-email-designer>

Please implement your image upload functionality and provide it to the library as above (imageUploadTriggered/imageSelectionTriggered).

🎨 UI Theming and Styles

You can make a few changes to make the Email Designer match your website colors.

Import the following styles into your global styles file (e.g., styles.scss):

@import '../node_modules/email-designer/src/lib/theme.scss';
@import '../node_modules/email-designer/src/lib/email-editor.css';

To make the Email Designer match your website's UI, include the following in your main.scss or styles.scss file and change the colors as you like.

 :root {
    --sws-icon-color: #ccc;
    --sws-icon-hover-color: #555;
    --sws-header-background: #eee;
    --sws-header-text-color: #555;
    --sws-border-color: #ccc;
 }

Further help

Write to designer [at] sendune [dot] com if you need any help.