BlazerEditor 1.0.8

dotnet add package BlazerEditor --version 1.0.8
                    
NuGet\Install-Package BlazerEditor -Version 1.0.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazerEditor" Version="1.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazerEditor" Version="1.0.8" />
                    
Directory.Packages.props
<PackageReference Include="BlazerEditor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlazerEditor --version 1.0.8
                    
#r "nuget: BlazerEditor, 1.0.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlazerEditor@1.0.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlazerEditor&version=1.0.8
                    
Install as a Cake Addin
#tool nuget:?package=BlazerEditor&version=1.0.8
                    
Install as a Cake Tool

BlazerEditor - Email Template Editor for Blazor

License: MIT .NET Blazor NuGet

A powerful, free, and open-source drag-and-drop email template editor for Blazor.

Build beautiful responsive email templates with an intuitive visual editor. No CDN dependencies, 100% free, MIT licensed.

⚡ Quick Start (3 Steps)

1️⃣ Install

dotnet add package BlazerEditor

2️⃣ Setup (Program.cs)

builder.Services.AddBlazerEditor();
builder.Services.AddRadzenComponents();

Add to _Host.cshtml or index.html:

<link rel="stylesheet" href="_content/Radzen.Blazor/css/material-base.css" />
<link href="_content/BlazerEditor/css/blazereditor.css" rel="stylesheet" />
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
<script src="_content/BlazerEditor/js/mergeTagAutocomplete.js"></script>

3️⃣ Use

@page "/editor"
@using BlazerEditor.Models
@using BlazerEditor.Services
@using BlazerEditor.Components
@inject MergeTagService MergeTagService

<EmailEditor @ref="editor" MergeTags="mergeTags" />
<button @onclick="Export">Export HTML</button>

@code {
    EmailEditor? editor;
    List<MergeTag> mergeTags = new();

    protected override void OnInitialized() => 
        mergeTags = MergeTagService.GetDefaultMergeTags();

    async Task Export() {
        var result = await editor!.ExportHtmlAsync();
        Console.WriteLine(result.Html); // Use the HTML!
    }
}

That's it! 🎉 You now have a fully functional email editor with merge tags.


🏷️ Using Merge Tags (Super Simple!)

Merge tags let you insert personalized data into emails (like {{first_name}}, {{company}}).

Two Ways to Insert Merge Tags:

1. Click the "Merge Tags 🏷️" button → Browse categories → Click a tag

Personal: {{first_name}}, {{last_name}}, {{email}}
Company: {{company}}, {{job_title}}
Links: {{unsubscribe_url}}, {{view_online}}

2. Type {{ anywhere → Autocomplete menu appears → Select tag

Type: {{fir  →  Shows "First Name"
Type: {{com  →  Shows "Company Name"

Custom Merge Tags:

mergeTags = new List<MergeTag> {
    new() { 
        Name = "Customer Name",
        Value = "{{customer_name}}",
        Category = "Personal",
        Sample = "John Doe"
    }
};

Replace Tags with Real Data:

var html = result.Html
    .Replace("{{first_name}}", "John")
    .Replace("{{company}}", "Acme Corp");
// Send personalized email!

That's all you need to know about merge tags! Simple and powerful. 🎉


Features

  • 🎨 Drag & Drop Interface - Intuitive visual email builder with real-time preview
  • 📱 Responsive Design - Mobile and desktop preview modes
  • 🎯 Rich Components - Text, images, buttons, headings, dividers, columns, and more
  • 🏷️ Merge Tags System - Powerful merge tag support with:
    • Dropdown picker with categorized tags
    • Autocomplete (type {{ to trigger)
    • Custom tag categories
    • Sample value preview
    • Search and filter functionality
  • 💾 Export/Import - Save designs as JSON, export as production-ready HTML
  • 🎨 Customizable Themes - Light and dark mode support
  • ↩️ Undo/Redo - Full history management
  • 🔧 Extensible - Add custom components and tools
  • 📦 Self-Contained - No external CDN dependencies, works offline
  • 🆓 Free & Open Source - MIT Licensed, no restrictions

📚 Complete Example

@page "/email-builder"
@using BlazerEditor.Models
@using BlazerEditor.Services
@using BlazerEditor.Components
@inject MergeTagService MergeTagService

<h3>Email Template Builder</h3>

<EmailEditor @ref="editor" 
             MergeTags="mergeTags"
             Options="options" />

<div class="actions">
    <button @onclick="ExportHtml">📤 Export HTML</button>
    <button @onclick="SaveDesign">💾 Save Design</button>
    <button @onclick="LoadDesign">📂 Load Design</button>
</div>

@code {
    EmailEditor? editor;
    List<MergeTag> mergeTags = new();
    EditorOptions options = new() {
        Appearance = new() { Theme = "modern_light" },
        DisplayMode = DisplayMode.Email
    };

    protected override void OnInitialized() {
        mergeTags = MergeTagService.GetDefaultMergeTags();
    }

    async Task ExportHtml() {
        var result = await editor!.ExportHtmlAsync();
        
        // result.Html - Ready-to-send HTML email
        // result.DesignJson - Save this to database for later editing
        
        await SendEmail(result.Html);
        await SaveToDatabase(result.DesignJson);
    }

    async Task SaveDesign() {
        // Returns JSON string - save to database
        var designJson = await editor!.SaveDesignAsync();
        await SaveToDatabase(designJson);
    }

    async Task LoadDesign() {
        // Load JSON from database
        var designJson = await LoadFromDatabase();
        await editor!.LoadDesignAsync(designJson);
    }

    async Task SendEmail(string html) {
        // Your email sending logic
    }

    async Task SaveToDatabase(string json) {
        // Your database save logic
    }

    async Task<string> LoadFromDatabase() {
        // Your database load logic
        return "{}";
    }
}

💾 Save & Load Example

// Save design to database
var designJson = await editor.SaveDesignAsync();
await _dbContext.EmailTemplates.AddAsync(new EmailTemplate {
    Name = "Welcome Email",
    DesignJson = designJson,
    CreatedAt = DateTime.UtcNow
});
await _dbContext.SaveChangesAsync();

// Load design from database
var template = await _dbContext.EmailTemplates.FindAsync(templateId);
await editor.LoadDesignAsync(template.DesignJson);

// Export HTML for sending
var result = await editor.ExportHtmlAsync();
await _emailService.SendAsync(recipient, subject, result.Html);

That's it! You're ready to build beautiful email templates. 🚀

Need Help?

Why BlazerEditor?

100% Free - No pricing tiers, no hidden costs ✅ Open Source - MIT License, modify as you need ✅ Self-Contained - No CDN dependencies, works offline ✅ Privacy First - Your data stays on your infrastructure ✅ Blazor Native - Built specifically for .NET developers ✅ Fully Customizable - Complete source code access ✅ No Vendor Lock-in - Own your email editor

Comparison with Unlayer

Feature Unlayer BlazerEditor
Platform React Blazor
Pricing Freemium Always Free
Source Closed Open Source
CDN Required Yes No
Offline Support No Yes
Customization Limited Unlimited

Contributing

We welcome contributions! Whether it's:

  • 🐛 Bug reports
  • 💡 Feature requests
  • 📝 Documentation improvements
  • 🔧 Code contributions

Open an issue or pull request on GitHub!

Roadmap

  • Core editor functionality
  • Basic components (text, image, button, etc.)
  • HTML export
  • Undo/redo
  • More components (social, video, spacer)
  • Image upload integration
  • Template marketplace
  • Custom fonts
  • Collaboration features

License

MIT License - Free for personal and commercial use.

Copyright (c) 2024 BlazerEditor Contributors

Acknowledgments

Inspired by Unlayer's React Email Editor. Built with ❤️ for the Blazor community.


Star ⭐ this repo if you find it useful!

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.8 251 10/27/2025
1.0.5 228 10/27/2025
1.0.4 221 10/27/2025
1.0.3 226 10/27/2025
1.0.2 215 10/27/2025
1.0.1 210 10/26/2025
1.0.0 216 10/26/2025

v1.0.8 - Stable release
- All features working and tested
- Production ready
- Multi-framework support (.NET 8 and 9)

v1.0.6 - .NET 9 compatibility and package improvements
- Multi-target .NET 8.0 and .NET 9.0 for maximum compatibility
- Relaxed package version constraints to prevent conflicts
- Improved type accessibility across framework versions
- Better integration with consuming projects

v1.0.4 - Clean package with essential documentation only
- Removed all extra documentation files
- Single comprehensive README for NuGet users
- Cleaner package structure
- All features remain the same

v1.0.3 - Simplified documentation and better examples
- Completely redesigned README with 3-step quick start
- Clear merge tags section with visual examples
- Shows both UI methods (dropdown button + autocomplete)
- Complete working code examples
- Better visual hierarchy and organization
- Easier for new users to get started

v1.0.2 - Documentation and UI improvements
- Enhanced merge tag picker UI with better styling
- Comprehensive integration guide added
- Detailed merge tags documentation
- Quick start guides for NuGet users
- Improved component styling and responsiveness
- Fixed static web assets configuration
- Added package information documentation
- Better error handling and diagnostics

v1.0.1 - Bug fixes
- Fixed static assets loading issues
- Improved component initialization

v1.0.0 - Initial release
- Drag-and-drop email template editor
- Rich component library (text, image, button, heading, divider, columns)
- Merge tags with dropdown picker and autocomplete (type {{ to trigger)
- Responsive design with mobile/desktop preview
- HTML export with inline CSS
- Design save/load as JSON
- Undo/redo functionality
- No CDN dependencies - fully self-contained
- Radzen Blazor UI integration
- Customizable themes and appearance