Filament Carve es un proyecto de código abierto (Plugin Filament) creado por Jefferson Gonçalves. Compatible con Filament 3, Filament 4, Filament 5. Escrito en PHP y publicado bajo la licencia MIT.
Instálalo con Composer: composer require jeffersongoncalves/filament-carve
#Filament Carve


Carve markup for Filament, built on the official Laravel bridge markup-carve/laravel-carve:
CarveEditor: a textarea that validates Carve source and previews the rendered HTML in a modal.
CarveEntry: an infolist entry that renders Carve source as HTML.
CarveColumn: a table column that shows Carve source as plain text, or as HTML.
#Compatibility
#Installation
You can install the package via composer:
composer require jeffersongoncalves/filament-carve
Rendering is configured by laravel-carve. Publish its config to change the render profiles under converters (default, comment, trusted, ...):
php artisan vendor:publish --tag="carve-config"
#Upgrading from jeffersongoncalves/laravel-carve
Earlier releases were built on jeffersongoncalves/laravel-carve, which is abandoned in favor of markup-carve/laravel-carve. If your app uses it directly:
- Replace
jeffersongoncalves/laravel-carve with markup-carve/laravel-carve in your composer.json.
- Rename imports from
JeffersonGoncalves\Carve\ to MarkupCarve\LaravelCarve\ (Facades\Carve, Rules\ValidCarve, Casts\AsCarve, RenderedCarve).
- Republish
config/carve.php and move your profiles from the profiles key to converters.
#Usage
#Editor
use JeffersonGoncalves\Filament\Carve\Forms\Components\CarveEditor;
CarveEditor::make('body')
->profile('comment')
->preset('comment')
->strict()
->lint()
->previewable(false);
CarveEditor extends Filament's Textarea, so every textarea method (rows(), autosize(), maxLength(), ...) still works. The source is always checked with laravel-carve's ValidCarve rule.
#Infolist entry
use JeffersonGoncalves\Filament\Carve\Infolists\Components\CarveEntry;
CarveEntry::make('body')
->profile('trusted');
#Table column
use JeffersonGoncalves\Filament\Carve\Tables\Columns\CarveColumn;
CarveColumn::make('body')->limit(80);
CarveColumn::make('body')->html();
#Security
Rendered HTML is printed unescaped. Safety comes from the laravel-carve profile: use a safe_mode profile (the default and comment profiles are safe) for user supplied content, and a profile with safe_mode => false only for content you trust.
#Testing
composer test
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Contributing
Please see CONTRIBUTING for details.
#Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). Please see License File for more information.