by James Harley
A Trumbowyg WYSIWYG editor field.
You can install the package via composer:
composer require jkharley/filament-trumbowyg
use JKHarley\FilamentTrumbowyg\Trumbowyg; Trumbowyg::make('my-field')
You can customise the buttons pane by passing an array of buttons to the buttons key in the filament-trumbowyg
config file. This will overwrite the default buttons pane set by Trumbowyg and will be used across all Trumbowyg
fields.
php artisan vendor:publish --tag="filament-trumbowyg-config"
// config/filament-trumbowyg.php'buttons' => [ ['undo', 'redo'], ['strong', 'em', 'del'], 'link', 'fullscreen',]
Alternatively you can pass an array of buttons to the buttons
method on the field.
You can also use this to overwrite the buttons set in the config file for a specific field.
Trumbowyg::make('my-field') ->buttons([ ['undo', 'redo'], ['strong', 'em', 'del'], 'link', 'fullscreen', ]),