- Can I use setono/editorjs-bundle in a Laravel application?
- No. setono/editorjs-bundle is a Symfony bundle: it ships a Bundle subclass registered in config/bundles.php, a DependencyInjection extension, a Symfony FormType, and Twig form-theme assets. Laravel does not auto-discover or boot Symfony bundles, and there is no ServiceProvider, facade, publishable config, or Blade integration. Installing it in a Laravel app leaves you with an inert dependency at best.
- What does setono/editorjs-bundle actually provide?
- It wraps the setono/editorjs-php library so Symfony applications can use the Editor.js block-style editor. It provides Symfony form integration, data transformers for converting between Editor.js JSON and PHP values, and rendering helpers. All of that surface is Symfony-native, so none of it is reusable in a Laravel codebase without a rewrite.
- Does setono/editorjs-bundle support Laravel 11 and Laravel 12?
- No. Laravel 11 and 12 pin Symfony components transitively to the 7.x line, so a bundle that permits Symfony 8 is not consumable through Laravel even in principle. The Symfony 8 allowance is forward-looking housekeeping, not a Laravel compatibility path. There is no supported way to register or boot this bundle in a Laravel app.
- How do I install setono/editorjs-bundle?
- In Symfony you would run composer require setono/editorjs-bundle, register it in config/bundles.php, and configure the form type. In Laravel the same Composer install succeeds but nothing boots the bundle, so no services, form themes, or helpers become available. Treat it as uninstallable for a Laravel project.
- Is there a Laravel-native package for Editor.js?
- There is no widely adopted Laravel-native package that mirrors this bundle, so the practical answer is to build a thin wrapper yourself. Add @editorjs/editorjs and only the block tools you need through npm and Vite, then mount the editor from a Blade component. That avoids pulling a foreign DI container into your app and keeps the integration maintained by you.
- How do I integrate Editor.js in Laravel with Vite?
- Install @editorjs/editorjs plus your chosen block tools with npm, import them in your Vite entry point, and mount the editor in a Blade component such as <x-editorjs name="body" :value="$post->body" />. The component should call editor.save() on submit and write the JSON into a hidden input. On load, pass the stored JSON back into the editor's data option to hydrate existing content.
- How should I store Editor.js JSON in a Laravel database?
- Store the Editor.js OutputData JSON in a json column and add an Eloquent cast to a Blocks value object so you can work with typed blocks instead of raw arrays. Editor.js does not emit HTML by default, so the JSON is the source of truth. Persist only the block payload, not the editor's transient UI state.
- How do I validate Editor.js block JSON in Laravel?
- Never trust client-submitted JSON. Validate against a whitelist of permitted block types and a per-type schema using a custom Rule or a validator class, rejecting unknown or malformed blocks. Then normalize the payload before saving so stored content always matches what your renderer expects.
- How do I render Editor.js blocks in Blade without XSS?
- Render block by block in a Blade partial that switches on the block type and escapes all text with {{ }}. Never output raw editor HTML with {!! !!}, because the JSON is user-controlled and block content can carry injected markup. For links and media, validate URLs and only allow known protocols.
- What changed in setono/editorjs-bundle v1.4.0 and does it affect Laravel adoption?
- v1.4.0 only widens the Composer constraint to allow Symfony 8, with no new API, no deprecations, and no behavioral change for existing consumers. It is a positive maintenance signal but compatibility housekeeping rather than feature work, and it remains a single-vendor bundle. It does not change the verdict for Laravel: do not add this as a Composer dependency; reimplement the pattern as a Blade component, a validation rule, and a model cast.