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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@creaditor/newsletter-starterkit

v1.0.12

Published

Creaditor Newsletter Editor - Starterkit for creating beautiful email newsletters

Readme

@creaditor/newsletter-starterkit

📧 A powerful visual editor for creating beautiful email newsletters

A drag-and-drop newsletter editor with everything built-in. No external dependencies required!

✨ Features

  • 🎨 Visual Drag & Drop - Intuitive interface for building newsletters
  • 📱 Responsive Design - Mobile-friendly emails out of the box
  • 🔧 Customizable - Full control over styles and components
  • 🌍 i18n Support - Multiple languages supported
  • 💾 Auto-save - Never lose your work
  • 📝 Rich Text Editor - Powerful text editing capabilities
  • 🖼️ Media Gallery - Easy image and media management
  • 🎯 Merge Tags - Personalize emails for each recipient
  • Self-Contained - All files bundled, no CDN required

📦 Installation

npm install @creaditor/newsletter-starterkit

Or with yarn:

yarn add @creaditor/newsletter-starterkit

🚀 Quick Start

Simple HTML Integration

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Newsletter Editor</title>
</head>
<body>
    <div id="root"></div>
    
    <!-- Load the editor bundle -->
    <script src="node_modules/@creaditor/newsletter-starterkit/dist/creaditor.bundle.js"></script>
    
    <script>
        // Initialize the editor
        const editor = new cdtrStarter({
            target: document.getElementById('root'),
            width: '650px',
            language: 'en',
            onSave: (data) => {
                console.log('Newsletter saved:', data);
                // Send to your backend
            }
        });
    </script>
</body>
</html>

With Configuration

const editor = new cdtrStarter({
    target: document.getElementById('root'),
    width: '650px',
    language: 'en',
    
    // Document name
    documentName: 'My Newsletter',
    
    // User information
    user: {
        id: 'user123',
        email: '[email protected]',
        name: 'John Doe',
        logo: 'https://example.com/logo.png'
    },
    
    // Initial components (optional)
    components: [],
    
    // Callbacks
    onSave: (data) => {
        console.log('Content saved:', data);
    },
    
    onChange: () => {
        console.log('Content changed');
    },
    
    onSendTestEmail: (email) => {
        console.log('Send test to:', email);
    }
});

📖 API

Constructor Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | target | HTMLElement | required | The DOM element to mount the editor | | width | string | '650px' | Width of the newsletter | | language | string | 'en' | Editor language (en, he, etc.) | | languageJson | object | - | Custom language translations | | documentName | string | - | Name of the document | | components | array | [] | Initial newsletter components | | user | object | - | User information (id, email, name, logo) | | onSave | function | - | Called when content is saved | | onChange | function | - | Called when content changes | | onSendTestEmail | function | - | Called when test email is requested | | fonts | array | - | Available fonts | | mergeTags | object | - | Merge tags for personalization | | plugins | array | [] | Additional plugins |

Methods

// Get newsletter data as JSON
const data = await editor.commands.toJSON();

🎨 Customization

Custom Fonts

const editor = new cdtrStarter({
    target: document.getElementById('root'),
    fonts: [
        {
            id: 'Roboto',
            cssRule: 'Roboto, sans-serif',
            name: 'Roboto',
            url: 'https://fonts.googleapis.com/css2?family=Roboto&display=swap'
        }
    ]
});

Merge Tags (Personalization)

const editor = new cdtrStarter({
    target: document.getElementById('root'),
    mergeTags: {
        items: [
            { value: 'name', label: 'First Name' },
            { value: 'email', label: 'Email' },
            { value: 'company', label: 'Company' }
        ],
        prefix: '{{',
        suffix: '}}',
        title: 'Personalization'
    }
});

🌍 Internationalization

Supported languages:

  • English (en)
  • Hebrew (he)
  • Custom (provide your own languageJson)
const editor = new cdtrStarter({
    target: document.getElementById('root'),
    language: 'he', // Hebrew
    // Or provide custom translations:
    languageJson: {
        "save": "Save",
        "cancel": "Cancel",
        // ... more translations
    }
});

📁 Package Contents

@creaditor/newsletter-starterkit/
└── dist/
    ├── creaditor.bundle.js     (2.2MB - Main bundle)
    ├── index.html              (Demo page)
    └── [chunk files].js        (Lazy-loaded modules)

📱 Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

💡 Integration Examples

With CDN (if self-hosting)

<script src="https://your-cdn.com/creaditor.bundle.js"></script>
<script>
    const editor = new cdtrStarter({
        target: document.getElementById('root')
    });
</script>

With React (Load via useEffect)

import { useEffect, useRef } from 'react';

function NewsletterEditor() {
    const rootRef = useRef(null);
    
    useEffect(() => {
        // Load script
        const script = document.createElement('script');
        script.src = '/node_modules/@creaditor/newsletter-starterkit/dist/creaditor.bundle.js';
        script.onload = () => {
            new window.cdtrStarter({
                target: rootRef.current,
                width: '100%',
                language: 'en'
            });
        };
        document.body.appendChild(script);
        
        return () => document.body.removeChild(script);
    }, []);
    
    return <div ref={rootRef} />;
}

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

ISC © Adi L

🔗 Links


Made with ❤️ by Adi L