Search by

jeffersongoncalves / filament-mail-editor

jeffersongoncalves

Visual email template builder for Filament v5 with drag-and-drop blocks, live preview, and table-based HTML export.

3.1.0 2026-10-07 01:38 UTC

This package is auto-updated.

Last update: 2026-10-07 01:48:15 UTC


README

Filament Mail Editor

Filament Mail Editor

Buy Me A Coffee

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License

Visual email template builder for Filament v5. A drag-and-drop Livewire editor that outputs table-based, inline-CSS HTML compatible with every major email client (Gmail, Outlook, Apple Mail).

The templates, blocks, rendering, workflow and Mail::template() integration live in jeffersongoncalves/laravel-mail-editor, which is installed automatically. This plugin adds the Filament admin: resources, the drag-and-drop builder and the block forms.

Version Compatibility

Plugin Version Filament
1.x v3
2.x v4
3.x v5

Features

  • Drag-and-drop builder with live iframe preview (desktop/mobile/dark-mode), undo/redo and keyboard shortcuts
  • Filament resources for templates, categories, brand kits, themes and the saved block library
  • Review workflow actions (submit, approve, reject) with concurrent editing lock
  • Quality panel — accessibility (WCAG), spam score, link validation, preheader/alt text
  • Metrics widget for the dashboard
  • Everything from laravel-mail-editor: 22 email-safe blocks, inline-CSS HTML and plain-text export, template variables, version history, A/B variants

Requirements

  • PHP ^8.3
  • Filament ^5.0
  • ext-gd (for countdown image rendering)

Installation

composer require jeffersongoncalves/filament-mail-editor:^3.0

Publish and run migrations

php artisan vendor:publish --tag="mail-editor-migrations"
php artisan migrate

Publish config (optional)

php artisan vendor:publish --tag="mail-editor-config"

Register the plugin in your Filament panel

use JeffersonGoncalves\FilamentMailEditor\FilamentMailEditorPlugin;

public function panel(Panel $panel): Panel
{
    return $panel->plugins([
        FilamentMailEditorPlugin::make(),
    ]);
}

Seed demo data (optional)

php artisan db:seed --class="JeffersonGoncalves\MailEditor\Database\Seeders\MailEditorSeeder"

Usage

Sending, rendering, variables and Artisan commands come from laravel-mail-editor — see its README. For example:

use Illuminate\Support\Facades\Mail;

Mail::template('welcome-email', ['user_name' => $user->name])->to($user->email)->send();

Register a custom block

Register the block in config/mail-editor.php as described in laravel-mail-editor. To edit its props in the Filament block library, also implement JeffersonGoncalves\FilamentMailEditor\Blocks\Contracts\HasPropsSchema:

use Filament\Forms\Components\TextInput;
use JeffersonGoncalves\FilamentMailEditor\Blocks\Contracts\HasPropsSchema;
use JeffersonGoncalves\MailEditor\Blocks\AbstractEmailBlock;

class MyCustomBlock extends AbstractEmailBlock implements HasPropsSchema
{
    // type(), label(), icon(), defaultProps() ...

    public static function propsSchema(): array
    {
        return [
            TextInput::make('title')->required(),
        ];
    }
}

Upgrading from 3.0

3.1 moved the Laravel core into jeffersongoncalves/laravel-mail-editor:

  • Models, enums, events, support classes and the seeder moved from JeffersonGoncalves\FilamentMailEditor\… to JeffersonGoncalves\MailEditor\….
  • Config, migrations and translations of the core use the mail-editor key: config/mail-editor.php, --tag="mail-editor-migrations", --tag="mail-editor-config".
  • The preview and countdown routes moved from /filament-mail-editor/* to /mail-editor/* (names mail-editor.preview / mail-editor.countdown).
  • JSON exports use the mail-editor format id; files exported with the old filament-mail-editor id still import.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.