Files
fotospiel-app/app/Filament/Blog/Traits/HasContentEditor.php

29 lines
691 B
PHP

<?php
namespace App\Filament\Blog\Traits;
use Filament\Forms\Components\MarkdownEditor;
trait HasContentEditor
{
public static function getContentEditor(string $field)
{
return MarkdownEditor::make($field)
->label('Inhalt')
->columnSpanFull()
->toolbarButtons(config('filament-blog.toolbar_buttons', [
'bold',
'italic',
'underline',
'strike',
'bulletList',
'orderedList',
'link',
'table',
'codeBlock',
'h1',
'h2',
'h3',
]));
}
}