bastihilger / nova-tiptap

Laravel Nova Tiptap Field
MIT License
172 stars 61 forks source link

Default values does'nt work #43

Closed keizah7 closed 3 years ago

keizah7 commented 3 years ago

https://nova.laravel.com/docs/3.0/resources/fields.html#default-values

Tiptap::make('Rules', 'rules')
    ->hideFromIndex()
    ->rules('nullable', 'min:5', 'max:5000')
    ->buttons(TipTapTrait::buttons())
    ->headingLevels(TipTapTrait::allHeadings())
//                ->resolveUsing(fn () => 'Manogi\Tiptap')
    ->default(fn () => 'default.'),
bastihilger commented 3 years ago

@keizah7 hi there - please describe steps to reproduce your problem. When I test it with exactly the code from the docs it works nicely, and also your version ->default(fn () => 'default.') works nicely for me. When I use it creating a new Resource, "default." ist the content of my editor. So I'm not sure what exactly the problem is?

keizah7 commented 3 years ago

It works for me too now. Thanks