malzariey/filament-lexical-editor
A Filament form field that brings the Lexical rich text editor to your admin panels. Create clean, modern WYSIWYG content with JSON output, seamless Livewire integration, customizable toolbars, and an intuitive editing experience for Laravel apps.
Architecture fit. The package is a thin Filament form-field wrapper around Meta's Lexical editor: a PHP Field subclass, a Blade view, and a JavaScript bundle that mounts Lexical against a Livewire-bound state property. That is the right shape for the TALL stack — no server-side rendering service, no separate Node process, no database opinions imposed. It slots into a panel's form schema the same way the native RichEditor does, so the architectural blast radius is confined to the authoring surface.
The critical misalignment is the data contract. Filament's native RichEditor is Trix-based and stores HTML. Lexical persists an EditorState as a versioned JSON tree. Swapping fields is therefore a storage-format migration, not a drop-in replacement — and the package does not ship a PHP or headless-JS renderer to turn that JSON back into HTML for Blade views, emails, PDFs, API responses, or search indexing. Until that render path exists and is owned internally, the package is half a solution. This is the single largest architectural gap and should drive the adoption decision.
Integration feasibility. Mechanically trivial: composer require, register the field's assets in a service provider or panel config, add LexicalEditor::make('content') to a schema. A competent Filament developer reaches a working demo in an afternoon. Production readiness is a different number — realistically 2–4 weeks of engineering for the render pipeline, sanitization, validation rules, migration of one content type, and end-to-end tests.
Technical risk. High, and concentrated in vendor risk rather than code risk:
wire:model dehydration; long documents can bloat requests and trip size limits without debouncing and dehydrateStateUsing discipline.Key questions to put to the maintainer (or answer by reading the source):
dist/ assets, or require npm install && npm run build inside vendor/? The latter is a serious CI/Docker constraint.Stack fit. Laravel 10–12, Livewire 3, Filament 3.x, Alpine for the mount lifecycle, Tailwind for chrome. No new runtime infrastructure. The only new build-time dependency is the editor's JS bundle.
Migration path. Do not migrate existing RichEditor columns. Introduce Lexical as a parallel field on new content types, or add a content_json column alongside the existing content_html, dual-writing during transition. Legacy HTML→Lexical backfill is lossy and should be treated as a separate, explicitly-scoped project — not a launch prerequisite.
Compatibility posture. Pin the package to an exact version, commit the lockfile, and vendor or publish the built assets into your own repo so a composer update cannot silently change editor behavior. Treat the package as a fork-from-day-one: mirror it into an org namespace you control.
Sequencing.
Maintenance. Budget for internal ownership within two quarters. A 16-star, single-maintainer package with no dependents should be assumed to be unmaintained at some future point; the fork is the mitigation, not the contingency. Ongoing cost is small but non-zero: Lexical version bumps, Filament major upgrades, and npm advisory triage.
Support. No SLA, no paid tier, GitHub issues only. Internal runbook and a named owner are mandatory. Escalation ends at your own engineers.
Scaling. The Lexical core plus plugins adds meaningful client JS weight to the admin bundle — acceptable behind auth, not acceptable for public pages. JSON state is materially larger than equivalent HTML; plan for JSON/LONGTEXT columns, consider compression for large documents, and watch Livewire request sizes. If content is ever rendered on public pages, the JSON→HTML path becomes a latency and SEO concern requiring caching.
Failure modes to instrument:
Ramp-up. Filament-familiar developers are productive in hours; the new skill is Lexical's node/plugin model and its serialization contract, which is a genuine 1–2 day investment per engineer plus documentation. Because the ecosystem has no tutorials or community answers for this specific wrapper, internal docs are the only knowledge base — write them during the pilot, not after.
Recommendation. Conditionally viable for an internal, low-blast-radius authoring surface with a small number of content types, provided the team accepts the fork and owns the render path. Not recommended for customer-facing, long-lived, or high-volume content without that ownership commitment in place. Decision gate: proceed past the spike only if the render path and asset-build story are resolved and the maintainer answers questions 1–3 satisfactorily.
How can I help you explore Laravel packages today?