DropBlockEditor requires Livewire v3 and PHP 8.1 or higher.
You can install the package via composer:
composer require jeffreyvr/dropblockeditor
You can publish the config file with:
php artisan vendor:publish --tag="dropblockeditor-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="dropblockeditor-views"
First, make sure Livewire is installed in your Laravel app.
Create a blade template that renders the block editor component, like so:
@livewire('dropblockeditor', [ 'title' => 'Your example campaign' ])
Your editor should already be working now.
Creating a block
A block has a visual side which is the
Block class and an optional modified Livewire component (
BlockEditComponent) to make it editable.
Run the following artisan command to create a new Block with an edit component:
php artisan dropblockeditor:make Text
Note that the values of the block are accessable in your edit component through the
Once your block is finished, you can either register it in the
config/dropblockeditor.php file or pass through with the Livewire component.