jd-dotlogics/laravel-grapesjs
Integrate the GrapesJS visual page builder into Laravel with ready-made routes, Blade components, and storage helpers. Build drag-and-drop HTML/CSS pages and templates, then save and render them from your Eloquent models with minimal setup.
composer require dotlogics/laravel-grapesjs and let Laravel auto-discover the service provider.php artisan migrate if you plan to use the DB-backed storage manager. Publish tags vary by version, so list them with php artisan vendor:publish rather than guessing.config/grapesjs.php first. It is the control panel for this package: editor id, plugin list, storage manager driver, and any route/middleware wiring. Nearly every behavioural question you'll have day to day is answered or overridden here.Editor service and returns its rendered view, e.g. a controller method returning view('admin.editor', ['editor' => $editor->view()]) behind your auth/can middleware. Save the editor output, then render the stored HTML in your own application or mailer.Start with the smallest possible loop — one route, one editor, one row in a table — before touching plugins or storage customisation. The editor is the easy part; persistence and re-hydration are where the real design work happens.
Persist three artifacts, not one. Store the GrapesJS project JSON alongside the generated HTML and CSS. JSON is what lets a user reopen and continue editing; HTML/CSS is what you ship to end users. A single json column plus html and css columns (or a renders() accessor) on your own Template/EmailTemplate model is the common shape.
Wrap the package in your own domain model. Don't let controllers talk to raw arrays from the storage manager. Put the save/load logic behind a repository or model method, so you can swap the package's storage manager for a custom implementation later without ripping up controllers.
Custom storage manager for anything non-trivial. If you need tenant scoping, S3, versioning, or audit history, register a custom storage manager class in the config and let it delegate to your own repository. This is the package's main extension point and keeps the editor decoupled from your persistence rules.
Multiple editors per page. When editing more than one template at a time (e.g. a list of email variants), give each instance a distinct editor id via config/options. Shared ids cause the second instance to attach to the first's DOM node.
Plugin and block registration. Add GrapesJS plugins and custom block sets through the config's plugin array, shipping your plugin JS as a published asset. Keep custom blocks in version control and load them via your own asset bundle rather than editing vendor files.
Preview and export pipeline. For email templates, treat the editor output as a draft: run it through an inliner and any required sanitisation before sending. For web pages, pass the stored HTML through your existing sanitiser or a trusted-only admin gate.
Upgrades. Pin the minor version, upgrade deliberately, and re-publish assets with --force after bumping so the front-end JS matches the PHP side.
php artisan config:clear and view:clear catch a large share of "my settings aren't applying" reports.storage/app/public and php artisan storage:link before blaming the storage manager for failed saves.public/vendor. When behaviour changes inexplicably after an upgrade, hard-refresh and confirm the published asset version.How can I help you explore Laravel packages today?