Bring alignment tools, spoiler formatting, and a configurable toolbar to Filament’s Markdown editor. This package ships a drop-in field component plus a panel plugin that exposes a single Markdown toolbar definition you can reuse across panels, forms, and repeaters.
Warning
This is an early build. The feature set is still evolving and customization options are limited for now. The package requires Filament Curator (it is included as a dependency), so Curator must be installed and available for the media picker features to work.
composer require iniznet/filament-markdown-editor-extendedPublish the configuration if you want to customize the global toolbar:
php artisan vendor:publish --tag="filament-markdown-editor-extended-config"You can also publish the provided stubs:
php artisan vendor:publish --tag="filament-markdown-editor-extended-stubs"Attach the plugin to your panel to share one toolbar definition everywhere. The plugin lives under the Iniznet\FilamentMarkdownEditorExtended namespace.
use Filament\Panel;
use Iniznet\FilamentMarkdownEditorExtended\MarkdownEditorExtendedPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel->plugins([
MarkdownEditorExtendedPlugin::make()
->toolbar([
['bold', 'italic', 'strike', 'link'],
['blockquote', 'codeBlock'],
['spoiler'],
]),
]);
}
}If you prefer configuration files, edit config/markdown-editor-extended.php instead:
return [
'toolbar' => [
['bold', 'italic', 'strike', 'link'],
['heading'],
['blockquote', 'codeBlock', 'bulletList', 'orderedList'],
['alignLeft', 'alignCenter', 'alignRight', 'alignJustify'],
['spoiler'],
['table', 'attachFiles'],
['undo', 'redo'],
],
];Swap Filament’s MarkdownEditor component for the extended version. Alignment buttons and the spoiler toggle can be enabled/disabled per-field using booleans or closures.
use Iniznet\FilamentMarkdownEditorExtended\Forms\Components\ExtendedMarkdownEditor;
ExtendedMarkdownEditor::make('content')
->columnSpanFull()
->alignment(fn (?string $layout) => $layout === 'rich')
->spoiler()
->helperText('Spoiler + alignment tools are available when the layout allows rich text.');If you remove buttons from the toolbar, the component automatically strips unavailable actions while keeping the rest intact.
# run the test suite
composer test
# fix formatting
composer formatPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.