tbmatuka/editorjs-bundle
Laravel bundle for the Editor.js block-style editor. Store, parse and render Editor.js JSON content, converting blocks into clean HTML for display. Simplifies integrating Editor.js with Laravel models and Blade views.
Architecture fit
The package is a Symfony bundle, not a Laravel package. Its value proposition is composed of Symfony-specific plumbing — bundle registration in Kernel, service definitions in the DI container, config tree loading, and likely a Twig form theme/extension. None of that maps onto Laravel's service provider, facade, and Blade model. In a Laravel codebase, the bundle as a unit is architecturally inert; the only transferable asset is the block-to-HTML rendering logic buried inside it. Treat this as a reference implementation, not a dependency.
Integration feasibility
Low as-is, high after decomposition. Editor.js persists a plain JSON document (time, blocks[], version), so the server's only real job is (a) validate the payload and (b) render blocks to safe HTML or a normalised structure. That renderer is a few hundred lines of switch-style mapping plus an allowlist sanitiser — trivially portable into app/Support/EditorJs/ behind a RenderEditorJs action. The bundle buys us no Laravel-side convenience that a first-party class doesn't.
Technical risk
composer update friction into a modern Laravel 10/11 app on PHP 8.2+.Key questions
version does it cover?editorjs-php and its Laravel wrappers) that is closer to our stack and actively released?Stack fit
Poor for a Laravel-first shop. If the org also runs Symfony, the bundle is a fine stopgap there and a bad one here. The pragmatic play is to vendor the rendering concept, not the code: one EditorJsRenderer class, one Block value object, one sanitiser boundary.
Migration path
editorjs-php on release cadence, block coverage, and sanitiser.app/Support/EditorJs/{Renderer,BlockParser,Sanitiser}.php with a config/editorjs.php block-type registry so unsupported blocks degrade gracefully.content_json + content_html) so reads never re-render.Compatibility
The server never negotiates with the Editor.js client — compatibility is purely about block schema drift. Pin the front-end Editor.js version and mirror its block set in the registry. Version the stored JSON (schema_version column) so future block additions can be backfilled rather than guessed.
Sequencing Spike (2 days) → build-vs-adopt decision → renderer + sanitiser with fixture tests → schema versioning on the content column → admin preview/API contract → done. Do not block feature delivery on adopting the bundle; the renderer is the only critical-path item.
Maintenance Adopting the bundle means owning a fork within 12 months. Porting the renderer means owning ~300–500 lines with tests — roughly 0.1–0.2 FTE ongoing, mostly tracking Editor.js block additions. The fork path costs more and delivers less.
Support No vendor, no SLA, no security advisories. GitHub issues on a four-year-dormant repo are effectively archival. Internal ownership is mandatory in either scenario; the port at least puts the code where our engineers already look.
Scaling
Rendering is CPU-light and O(blocks) — but do it on write, not on read. At 10k+ content reads/day, per-request JSON→HTML conversion plus sanitisation is avoidable latency; store the rendered output and cache-bust on content update. Watch document size: Editor.js documents with embedded image data or long lists can push JSON blobs into the hundreds of KB — use json/longtext columns and avoid selecting the JSON column on list endpoints.
Failure modes
link hrefs) rendering into Blade with {!! !!}. Mitigate with an allowlist sanitiser at the write boundary and {!! !!} only on sanitised output.blocks key or non-array payload returning a 500; validate with a FormRequest and fail 422.Ramp-up Low. A mid-level Laravel engineer familiar with Blade and Composer can port and test a renderer in 1–2 days; understanding the Editor.js schema is the only new knowledge. Onboarding onto a forked Symfony bundle, by contrast, requires Symfony DI fluency the team likely lacks — another reason to port rather than adopt.
Recommendation: Do not add tbmatuka/editorjs-bundle to the dependency graph. Mine it for the block-mapping table, implement a first-party renderer with an explicit sanitiser, and pin the front-end Editor.js version so schema drift is a controlled event rather than a production surprise.
How can I help you explore Laravel packages today?