Files
nutzwerte_fi4/app/Filament/Resources/Textblocks/Schemas/TextblockForm.php
T
2025-10-21 18:00:44 +02:00

43 lines
1.7 KiB
PHP

<?php
namespace App\Filament\Resources\Textblocks\Schemas;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
class TextblockForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('name')
->required(),
Textarea::make('beschreibung')
->afterLabel('Bei gleichen Textblockarten kann hier der Unterschied kurz angerissen werden.'),
RichEditor::make('textblock')
->extraInputAttributes(['style' => 'min-height: 20rem; max-height: 50vh; overflow-y: auto;'])
->toolbarButtons([
['bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', 'horizontalRule', 'table'],
])->floatingToolbars([
'paragraph' => [
'bold', 'italic', 'underline', 'strike', 'subscript', 'superscript',
],
'heading' => [
'h1', 'h2', 'h3',
],
'table' => [
'tableAddColumnBefore', 'tableAddColumnAfter', 'tableDeleteColumn',
'tableAddRowBefore', 'tableAddRowAfter', 'tableDeleteRow',
'tableMergeCells', 'tableSplitCell',
'tableToggleHeaderRow',
'tableDelete',
],
]),
])->columns(1);
}
}