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

Filament Code Editor Laravel Package

wiebenieuwenhuis/filament-code-editor

A Filament form field that adds a full-featured code editor powered by CodeMirror, with syntax highlighting, themes, and configurable modes for editing code, JSON, and other languages directly inside your Filament forms and panels.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What the package is. A Filament form-field plugin that renders a CodeMirror-based editor in place of a standard textarea. It is a thin UI adapter: it registers a custom Filament Field class, ships a JS/CSS asset bundle through Filament's asset pipeline, and syncs editor contents back to Livewire component state. There is no server-side logic, no persistence layer, no external service dependency — the entire footprint is a Blade view, an Alpine/JS binding, and a PHP field class.

Architecture fit. Good fit where the host application is already a Filament panel and the need is "let an admin edit JSON/YAML/Blade/SQL/JS in a form." It composes with Filament's existing form schema, validation, and authorization model rather than introducing a parallel editing surface. It is a poor fit for anything outside Filament (standalone Blade forms, public-facing editors) and for use cases requiring diffing, multi-file editing, or server-side linting — none of which this package provides.

Integration feasibility. High for a spike: installation is Composer + asset publish, and usage is a single field in a form schema. The real work is not installation but verification — confirming the field's state-sync semantics against the Livewire version in use, confirming the CodeMirror language/theme options cover the target file types, and confirming validation and dehydrateStateUsing behavior when the editor is empty or uninitialized.

Technical risk. Concentrated in four areas:

  • Bus factor and adoption. 18 stars, 0 dependents, single maintainer, no ecosystem validation. The April 2025 release is recent, which is positive, but the project has not been stress-tested by a broad user base. Assume you are the first serious adopter and budget accordingly.
  • Filament/Livewire version coupling. Filament majors move quickly and have historically changed asset registration, field lifecycle, and Alpine integration. A field plugin sits directly on those seams. Every Filament upgrade becomes a compatibility review, not a routine bump.
  • Client-side state fidelity. The editor owns the DOM; Livewire owns the state. Bugs here manifest as silent data loss (user types, editor never dispatches, form submits stale value) rather than exceptions — the worst failure class for an admin tool.
  • Asset and CSP posture. CodeMirror is a non-trivial JS/CSS payload loaded into every page that renders the field. Content-Security-Policy with nonce/strict-dynamic, or an environment that blocks inline styles, can break rendering in ways that are environment-specific and hard to reproduce.

Key questions for the maintainer (or for your own spike):

  1. Which Filament major versions are supported, and is there a CI matrix that actually exercises each?
  2. How is state synced — on change, on blur, or via Alpine x-model — and what happens if the editor fails to initialize? Is there a fallback textarea?
  3. Are assets published to public/ or served from the package, and how are they cache-busted on upgrade?
  4. Is there automated test coverage (Pest/PHPUnit for the field class, Dusk/Playwright for the browser behavior), or is it manual-only?
  5. What is the committed support window and the maintainer's response pattern on issues?

Integration Approach

Stack fit. Requires Laravel + Filament (v3, possibly v4 — verify against composer.json constraints before committing). No database, queue, or infrastructure implications. If the host app is not on Filament, this package is not applicable and the correct alternative is a direct CodeMirror or Monaco integration.

Build vs. buy. The package's value is roughly 200–400 lines of glue you could own. That is the central TPM tradeoff: adopting it saves a day of work and buys you an external dependency with a single maintainer. Given 0 dependents and low stars, treat this as buying a starting point, not buying a product — plan to fork or vendor it if it becomes load-bearing.

Migration / adoption path:

  1. Spike (1–2 days, one engineer). Install in a non-production branch. Build one real form — ideally the highest-value code-editing surface in the admin panel — and exercise: empty state, very large input (100KB+), invalid syntax, validation failure re-render, dark/light theme, and Livewire partial reload.
  2. Harden. Wrap the field in a thin in-house subclass or Blade partial so the vendor class name appears in exactly one place. Add a fallback <textarea> when JS is unavailable. Add a dehydrateStateUsing guard against null/empty submission.
  3. Pin and document. Exact-version Composer constraint (not ^), plus a short ADR recording why this package, what was evaluated, and the fork trigger conditions.
  4. Roll out to internal/admin-only surfaces first. Do not place it on a form where a lost keystroke means a broken production config without an audit trail or version history behind it.

Alternatives worth benchmarking in the same spike: Filament's built-in Textarea with monospace styling (zero risk), a Monaco-based field, or a small in-house CodeMirror wrapper. Benchmarking is cheap and gives you a credible fallback if the spike fails.

Sequencing relative to Filament upgrades: adopt only after your Filament major is settled and not mid-upgrade. Do not adopt this package in the same release train as a Filament version bump — you will not be able to attribute failures.

Operational Impact

Maintenance. Low absolute surface area, but the cost is latency risk: when Filament ships a breaking change, you depend on one volunteer to ship a fix. Mitigation is to vendor or fork at adoption time so a patch is a local commit, not a blocked PR. Budget roughly 1–2 engineer-days per Filament major for compatibility validation, and a few hours per minor.

Support. No commercial support, no SLA. Internal ownership must be explicitly assigned — "the platform team owns the fork" — otherwise it becomes orphaned infrastructure the first time the original maintainer goes quiet. Monitor upstream releases and issues on a quarterly cadence at minimum.

Scaling. Effectively a non-issue. All work is client-side and per-request; there is no server load, no data growth, no concurrency concern. The only scaling dimension is payload: the editor bundle ships on every page that renders the field. Keep it off list/dashboard pages, and confirm gzip/brotli and long-lived cache headers on the asset.

Failure modes to design against:

Failure Symptom Mitigation
JS bundle blocked by CSP Blank or unstyled field Fallback textarea; CSP review before rollout
Editor fails to bind to Livewire Silent stale value on submit Server-side validation + explicit dirty-state test in CI
Filament upgrade breaks field lifecycle Field missing or throws on render Pinned version, upgrade in isolation, smoke test
Upstream abandonment No fix for a breaking change Fork on adoption, or vendor the class into the app
Large document handling UI lag, dropped keystrokes Set a size threshold; degrade to plain textarea above it

Ramp-up. For a Laravel/Filament developer, hours — it is one field in a schema. The nontrivial knowledge is not the package but CodeMirror configuration (languages, themes, extensions) and Livewire/Alpine lifecycle, which is the same knowledge required to debug it. Document the config surface you actually use (languages, heights, themes) so the next developer does not rediscover it.

Recommendation. Adopt conditionally: viable for internal, admin-only code editing in an existing Filament panel, with a one-day spike gating the decision, a pinned version, an in-house wrapper class, and a written fork trigger ("no release within 90 days of a Filament major"). Do not adopt for public-facing forms, for surfaces where silent data loss is unrecoverable without versioning/audit, or if the team cannot absorb ownership of the fork. The 0.51 score and 18 stars are a fair reflection: this is a useful piece of glue, not an established dependency — treat it as code you are taking responsibility for.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin