From 8379db179d3471d88dc24cfbaf9522cb69d1d2f9 Mon Sep 17 00:00:00 2001 From: LT Date: Fri, 23 Feb 2024 14:05:22 +0530 Subject: [PATCH] upgrade: 2.0 --- README.md | 16 +- resources/views/fields/ckeditor.blade.php | 292 +++++++++++----------- src/Fields/CKEditor.php | 2 +- 3 files changed, 161 insertions(+), 149 deletions(-) diff --git a/README.md b/README.md index bf2615a..23325a7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ -# CKEditor field for [MoonShine Laravel admin panel](https://moonshine.cutcode.dev) +# CKEditor field for [MoonShine Laravel admin panel](https://moonshine-laravel.com) -## Documentation -[Read CKEditor field in Official MoonShine Documentation](https://moonshine.cutcode.dev/section/fields-wysiwyg) +## Installation +```shell +composer require moonshine/ckeditor +``` + +## Usage + +```php +use MoonShine\CKEditor\Fields\CKEditor; + +CKEditor::make('Label') +``` diff --git a/resources/views/fields/ckeditor.blade.php b/resources/views/fields/ckeditor.blade.php index 41b3e07..c9d0a20 100644 --- a/resources/views/fields/ckeditor.blade.php +++ b/resources/views/fields/ckeditor.blade.php @@ -1,158 +1,160 @@ {!! $element->formViewValue($item) ?? '' !!} +>{!! $value ?? '' !!} diff --git a/src/Fields/CKEditor.php b/src/Fields/CKEditor.php index 0142dde..6dc7954 100644 --- a/src/Fields/CKEditor.php +++ b/src/Fields/CKEditor.php @@ -8,7 +8,7 @@ final class CKEditor extends Textarea { - protected static string $view = 'moonshine-ckeditor::fields.ckeditor'; + protected string $view = 'moonshine-ckeditor::fields.ckeditor'; protected array $assets = [ 'vendor/moonshine-ckeditor/css/ckeditor.css',