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

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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

  • Abandonment: last release 2021-03-14, no activity since, no security policy. Roughly four years of Editor.js block-schema drift (nested lists, table, toggle, warning, code with language, delimiter) is unaddressed.
  • Unvalidated: 19 stars and 0 dependents means no production signal, no Stack Overflow surface, no community patch stream. The 1.73 composite score and 13.56 opportunity score both point at "thin, stale, niche."
  • Version lock: a 2021 Symfony bundle will pin PHP ~7.1–8.0-era constraints, dragging composer update friction into a modern Laravel 10/11 app on PHP 8.2+.
  • Security ambiguity: unclear whether the bundled renderer escapes block content or trusts it. Any package that converts user-authored JSON to HTML without a documented sanitiser is an XSS liability until proven otherwise.

Key questions

  1. Does the bundle ship a renderer, or only form types/Twig helpers? (Determines whether there's anything to salvage.)
  2. Which PHP/Symfony constraints, and do they conflict with our target stack?
  3. Is output escaped per-block, and does it allowlist markup/attributes?
  4. Which Editor.js block types and which schema version does it cover?
  5. Is there a maintained alternative (editorjs-php and its Laravel wrappers) that is closer to our stack and actively released?

Integration Approach

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

  1. Spike: install in a throwaway Symfony 5 skeleton (or just read the source on GitHub) to extract the block-map and any escaping rules.
  2. Decide build vs. adopt: compare against editorjs-php on release cadence, block coverage, and sanitiser.
  3. Implement app/Support/EditorJs/{Renderer,BlockParser,Sanitiser}.php with a config/editorjs.php block-type registry so unsupported blocks degrade gracefully.
  4. Persist rendered HTML alongside the JSON (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.

Operational Impact

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

  • XSS — unescaped block fields (headers, captions, link hrefs) rendering into Blade with {!! !!}. Mitigate with an allowlist sanitiser at the write boundary and {!! !!} only on sanitised output.
  • Silent content loss — unknown block types dropped without a trace; log and render a fallback rather than emitting nothing.
  • Malformed JSON — missing blocks key or non-array payload returning a 500; validate with a FormRequest and fail 422.
  • Image/embed surface — if any block triggers server-side fetch (oEmbed, image probes), that's an SSRF vector; proxy or client-side resolve instead.
  • Deep nesting — recursive list rendering needs a depth cap to avoid stack blowups on hostile input.

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.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package