diff --git a/src/Editors/MarkdownEditor.php b/src/Editors/MarkdownEditor.php index 558fbfa..260b947 100644 --- a/src/Editors/MarkdownEditor.php +++ b/src/Editors/MarkdownEditor.php @@ -3,16 +3,16 @@ namespace LaraZeus\Sky\Editors; use Filament\Forms\Components\Component; +use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\Textarea; use LaraZeus\Sky\Classes\ContentEditor; -use Spatie\FilamentMarkdownEditor\MarkdownEditor as MarkdownEditorAlias; class MarkdownEditor implements ContentEditor { public static function component(): Component { - if (class_exists(MarkdownEditorAlias::class)) { - return MarkdownEditorAlias::make('content') + if (class_exists(RichEditor::class)) { + return RichEditor::make('content') ->required(); } @@ -21,7 +21,7 @@ public static function component(): Component public static function render(string $content): string { - if (class_exists(MarkdownEditorAlias::class)) { + if (class_exists(RichEditor::class)) { return str($content)->markdown(); } diff --git a/src/Filament/Resources/PostResource.php b/src/Filament/Resources/PostResource.php index fb1d162..60a7fb3 100644 --- a/src/Filament/Resources/PostResource.php +++ b/src/Filament/Resources/PostResource.php @@ -65,7 +65,8 @@ public static function form(Form $form): Form $set('slug', Str::slug($state)); }), - SkyPlugin::get()->getEditor()::component(), + SkyPlugin::get()->getEditor()::component() + ->label(__('Post Content')), ]), Tabs\Tab::make(__('SEO'))->schema([