From cde910e5f85961553e386331360c422b36e9c980 Mon Sep 17 00:00:00 2001 From: Alberto Benavides Date: Mon, 11 Sep 2023 05:24:52 -0600 Subject: [PATCH 1/2] Update MarkdownEditor.php Replaced with RichEditor from filamentphp --- src/Editors/MarkdownEditor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); } From 010e5201d01c7b738c85e6b796b61153f8f91d53 Mon Sep 17 00:00:00 2001 From: Alberto Benavides Date: Mon, 11 Sep 2023 05:44:48 -0600 Subject: [PATCH 2/2] Update PostResource.php Added Post Content label as lang susceptible --- src/Filament/Resources/PostResource.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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([