diff --git a/src/Tiptap.php b/src/Tiptap.php index e468806..f8e33f7 100644 --- a/src/Tiptap.php +++ b/src/Tiptap.php @@ -5,9 +5,10 @@ use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Route; use Illuminate\View\View; -use Voyager\Admin\Contracts\Plugins\ThemePlugin; +use Voyager\Admin\Classes\Formfield; +use Voyager\Admin\Contracts\Plugins\FormfieldPlugin; -class Tiptap implements ThemePlugin +class Tiptap implements FormfieldPlugin { public $name = 'Tiptap'; public $description = 'Tiptap WYSIWYG editor for Voyager 2'; @@ -54,4 +55,9 @@ public function getJsRoutes(): array route('voyager-tiptap') ]; } + + public function getFormfield(): Formfield + { + return new TiptapFormfield(); + } } diff --git a/src/TiptapFormfield.php b/src/TiptapFormfield.php new file mode 100644 index 0000000..036e911 --- /dev/null +++ b/src/TiptapFormfield.php @@ -0,0 +1,28 @@ +