Form Builder - Fields
Rich editor
Overview
The rich editor allows you to edit and preview HTML content, as well as upload images.
use Filament\Forms\Components\RichEditor; RichEditor::make('content')

Customizing the toolbar buttons
You may set the toolbar buttons for the editor using the toolbarButtons()
method:
use Filament\Forms\Components\RichEditor; RichEditor::make('content') ->toolbarButtons([ 'attachFiles', 'blockquote', 'bold', 'bulletList', 'codeBlock', 'h2', 'h3', 'italic', 'link', 'orderedList', 'redo', 'strike', 'underline', 'undo', ])
Alternatively, you may disable specific buttons using the disableToolbarButtons()
method:
use Filament\Forms\Components\RichEditor; RichEditor::make('content') ->disableToolbarButtons([ 'blockquote', 'strike', ])
Uploading images to the editor
You may customize how images are uploaded using configuration methods:
use Filament\Forms\Components\RichEditor; RichEditor::make('content') ->fileAttachmentsDisk('s3') ->fileAttachmentsDirectory('attachments') ->fileAttachmentsVisibility('private')
Edit on GitHubStill need help? Join our Discord community or open a GitHub discussion