piterlautaro / nova-gutenberg
Implementation of the Gutenberg editor as a Laravel Nova Field based on Laraberg.
Fund package maintenance!
mikebronner
0.5.1
2023-04-18 05:18 UTC
Requires
- cweagans/composer-patches: *
- laravel/nova: ~4.0
- symfony/thanks: ^1.2
- unisharp/laravel-filemanager: *
- van-ons/laraberg: *
This package is auto-updated.
Last update: 2025-02-18 08:55:57 UTC
README
Implementation of the Gutenberg editor as a Laravel Nova Field based on Laraberg.
Requirements
- Laravel Nova
- PHP 7.1.0+
Implemented Functionality
- Editor field in form.
- Field on index listing.
- Field on resource display.
- Image upload functionality.
Limitations
- Currently you can only have one Gutenberg field on a given page, due to how the Gutenberg library is implemented. Efforts are being made to address this upstream, but it has yet to be determined if that is possible.
- The editor UI still allows and prompts for drag-and-drop functionality. Unfortunately that is currently not functional, and the Media Library button must be used instead.
Installation
- Install the package:
composer require genealabs/nova-gutenberg
- Add the following to your scripts section in
composer.json
:
"post-package-update": [ "@php artisan vendor:publish --provider='VanOns\\Laraberg\\LarabergServiceProvider' --tag='public' --force", "@php artisan vendor:publish --tag=lfm_config", "@php artisan vendor:publish --tag=lfm_public" ]
- Run
composer update
.
Usage
use GeneaLabs\NovaGutenberg\Gutenberg; class BlogPost extends Resource { // ... public function fields(Request $request) : array { return [ // ... Gutenberg::make("Content"), // ... ]; } // ... }