Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Editorjs Bundle Laravel Package

setono/editorjs-bundle

Editor.js integration for Symfony: renders and sanitizes Editor.js block content, offers form types and Twig helpers, and converts stored JSON into safe HTML for easy display in your templates.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Bottom line up front: setono/editorjs-bundle is a Symfony bundle, not a Laravel package. Its TPM value to us is not as a dependency but as a reference implementation and a build-vs-buy decision artifact. Recommendation: do not add it to composer.json; mine it for the form-type/serialization pattern and budget a short in-house spike.

What this release actually is. v1.4.0 is a single Composer constraint widening — "Allow Symfony 8" — with no new API, no deprecations, and no behavioral change for existing consumers. It is compatibility housekeeping, not feature investment. It is a positive signal for vendor forward-trajectory but does not alter the adoption calculus for a Laravel codebase.

Architecture fit — poor. The integration surface is entirely Symfony-native: a Bundle subclass registered in config/bundles.php, a DependencyInjection extension, a Symfony FormType, and Twig form-theme assets. There is no ServiceProvider, no publishable config, no facade, no Blade directive, no Inertia/Livewire adapter. Laravel does not auto-discover or boot Symfony bundles, so "installing" it produces an inert dependency at best.

Integration feasibility — low as a dependency, medium as a pattern. The realistic path is reimplementation: take the Editor.js JS/CSS assets and the field serialization contract (Editor.js OutputData JSON → validated blocks → persisted JSON column) and rebuild a thin Laravel wrapper — a Blade component, a rule-based validator, and a model cast. That is a bounded 2–3 day spike, not a quarter-scale project, and it avoids dragging a foreign DI container into the app.

Technical risk. Four items dominate the register:

  1. Framework mismatch (high, structural) — unsupported integration path; any workaround would be bespoke, unmaintained, and undebuggable by the team.
  2. Transitive PHP floor (medium) — Symfony 8 targets PHP 8.4+. The widened constraint is opt-in, so it does not raise our floor today; it only signals direction.
  3. Bus factor / vendor concentration (medium) — single-maintainer bundle with 7 stars and no commercial backing, sitting atop Editor.js's own upstream churn. This is a double concentration risk we would be inheriting for a component we would still have to glue in ourselves.
  4. Content sanitization / XSS (medium) — the bundle renders stored JSON; hostile or malformed block payloads are a live concern regardless of who wrote the renderer.

Key questions to close before any decision.

  • Does the composer constraint remain additive (^6.4 || ^7.0 || ^8.0), and does CI still exercise Symfony 6.4/7.x on our PHP version? (Verify the diff, not the changelog.)
  • Has the PHP minimum moved alongside Symfony 8?
  • Are Editor.js JS assets vendored, or pulled from CDN/npm at runtime? Supply-chain and caching posture depend on this.
  • What is the actual product need — block-based structured authoring, or a simple rich-text field? Editor.js is opinionated (block JSON, no HTML output by default); confirm the content model matches how we intend to store and render articles.
  • Is there a maintained Laravel-native alternative already in the ecosystem before we build?

Integration Approach

Stack fit — none today. Laravel pins Symfony components transitively (Laravel 12 ships Symfony 7.x). A Symfony 8–permitting bundle is not consumable through Laravel even in principle until Laravel itself tracks Symfony 8. The release is forward-looking, not actionable.

Migration path — copy the pattern, not the package. Concretely:

  1. Add @editorjs/editorjs plus only the block tools we have product approval for, via npm/Vite.
  2. Build a Blade component (<x-editorjs name="body" :value="$post->body" />) that mounts the editor, writes editor.save() JSON to a hidden input, and hydrates from an existing value.
  3. Store in a json column; cast to a Blocks value object so the domain model owns the shape.
  4. Validate server-side against a whitelist of permitted block types with per-type schemas — never trust client JSON.
  5. Render via a Blade partial that switches on block type and escapes output — never {!! !!} the raw payload.

Compatibility seams to watch. Three, and they are independent tracks: Editor.js major versions (the block-tool API has broken across majors), the PHP/JSON round-trip (pin json_encode flags for unicode/escaping consistency), and CSP rules that could block inline editor scripts. Note the Symfony 8 alignment tells us nothing about Editor.js JS version support — the bundle's changelog is silent there, and conflating the two tracks is the most likely planning error.

Sequencing. Gate the commitment behind a spike: one Blade component, one block type, end-to-end save/load/render, validated. Only after the spike proves the content model do we lock the block whitelist, build the renderer, and write the migration for existing content. If the spike surfaces a need for deep nesting or collaborative editing, re-scope — Editor.js is not a collaborative editor, and this bundle would not have helped there either.

Operational Impact

Maintenance. Adopting the bundle would add a dependency we cannot upgrade through normal Laravel tooling and cannot patch without forking. The self-built wrapper is roughly 150–300 lines we own outright — comparable effort to debugging a foreign DI integration, with far clearer ownership and no vendor-lock surface. Either way, Editor.js block-tool churn is the real maintenance load, not this release.

Support. Upstream is a single maintainer with GitHub issues as the only channel — no SLA, no commercial backing. Internal support burden for a wrapper is one frontend-capable engineer. Document the block schema as a first-class contract; that artifact is what survives a tool swap and what protects us if we later replace Editor.js.

Scaling. Editor.js is client-side, so server cost is JSON storage plus validation — no horizontal scaling concerns. The real risk is payload size: large documents with many blocks produce multi-hundred-KB JSON bodies. Enforce a request size cap and a block-count limit at the validator before this becomes a production incident.

Failure modes. (a) Malformed or hostile block JSON persisted and later rendered — mitigate with strict server-side schema validation and escaped rendering; (b) an Editor.js major bump breaking block tools — pin the JS version and upgrade deliberately; (c) silent data loss when a block type is dropped from the whitelist but still exists in stored documents — render unknown types as a safe placeholder rather than dropping them; (d) if the bundle were forced in, boot failure or a silent no-op registration in the Laravel container, discovered late and with no in-house expertise to diagnose it.

Ramp-up. Low for the self-built route: a mid-level Laravel engineer comfortable with Blade and Vite can ship the spike in days; the Editor.js block API is the only unfamiliar surface and is well documented. High for the bundle route: the team would need Symfony bundle internals to debug it — knowledge we have no other reason to hold.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console