Filament v4 integration for Birdcar Flavored Markdown (BFM).
Provides drop-in replacements for Filament's markdown components that render through the BFM pipeline instead of the default CommonMark config.
- PHP 8.2+
- Filament 4.x
birdcar/markdown-laravel(pulled in automatically)
composer require birdcar/markdown-filamentThe service provider is auto-discovered. BFM styles are automatically registered as a Filament asset.
Drop-in replacement for MarkdownEditor with a server-rendered BFM preview.
use Birdcar\Markdown\Filament\Forms\Components\BfmEditor;
BfmEditor::make('body')
->previewDebounce(300) // optional, default is 300ms
->columnSpanFull();The editor adds a Preview/Edit toggle button above the EasyMDE editor. Preview is rendered server-side through Str::bfm() so it matches your actual output exactly.
All standard MarkdownEditor methods work (file attachments, toolbar buttons, min/max height, etc.).
Drop-in replacement for TextColumn that renders markdown content as BFM HTML.
use Birdcar\Markdown\Filament\Tables\Columns\BfmTextColumn;
BfmTextColumn::make('body');Drop-in replacement for TextEntry that renders markdown content as BFM HTML.
use Birdcar\Markdown\Filament\Infolists\Components\BfmTextEntry;
BfmTextEntry::make('body');php artisan vendor:publish --tag=bfm-filament-viewsPublishes the Blade views to resources/views/vendor/bfm-filament/. Only do this if you need to customize the editor markup.
- Filament v4 only. This package uses
callSchemaComponentMethodand#[ExposedLivewireMethod]which are v4 APIs. It will not work with Filament v3. - Preview is server-rendered. Each preview toggle makes a Livewire round-trip. The
previewDebounceoption only applies if you wire up live preview (the default is toggle-based, not live). - BFM styles load automatically. The service provider registers the CSS via
FilamentAsset::register(). You don't need to add@bfmStylesin Filament panels — it's handled for you. BfmTextColumnandBfmTextEntrycall->html()internally. Don't chain->html()again; it's already set up.- The Laravel package must be configured. Render profile and resolvers are controlled by
config/bfm.phpfrom the Laravel package. The Filament package reads from the same converter singleton.
cd packages/filament
composer install
composer test # Run tests
composer analyse # Run PHPStan (level 8)Tests use Orchestra Testbench with Filament's SchemasServiceProvider. The composer.json includes path repositories pointing to both ../../ (core) and ../laravel (Laravel package) for monorepo resolution.