ueberdosis/prosemirror-to-html
Convert ProseMirror and TipTap JSON documents into clean HTML with this Laravel/PHP package. Render rich text content from your editor reliably, handling nodes, marks, and nested structures through a simple, straightforward API.
Architecture fit
json/longtext column and the back end needs HTML for emails, PDFs, RSS, search indexing, or server-rendered pages.toDOM-style attribute mapping) should be familiar, but the PHP port is structurally independent of the JS source of truth.Integration feasibility
composer.json will likely need overriding or a fork to install on a current stack.Repository: unknown in the package metadata is a supply-chain red flag. Before adoption, verify the Packagist source/dist URLs, tag-to-commit integrity, and that the published tarball matches the tagged source.Technical risk
ezyang/htmlpurifier or mews/purifier) must sit downstream, not be assumed.generateHTML and this renderer shows up as subtly different markup in emails versus the editor preview, which is hard to test for and easy to ship.Key questions
Stack fit
Migration path
ContentRendererContract::toHtml(array $doc): string in the application and bind the package behind it. Nothing else in the codebase imports the package namespace. This is the single decision that makes the eventual replace-or-fork cheap."repositories" fork with a maintained branch, or copy the source in-tree under app/Support/ProseMirror. Forking preserves MIT attribution and gives a place to patch PHP-version and escaping issues.Compatibility
composer.json for php and illuminate/support constraints and add platform overrides only where you have tested.Sequencing
Recommendation: adopt conditionally, wrapped and forked, for non-critical rendering paths. If server-side rendering becomes a core product surface, the headless-Node option using the maintained JS renderer is the lower long-term risk.
Maintenance
Support
Scaling
Failure modes
| Failure | Symptom | Mitigation |
|---|---|---|
| Unknown node/mark | Exception or silent content loss | Explicit policy + counter metric + alert |
| Unescaped attribute | Stored XSS | Downstream allowlist sanitiser, non-negotiable |
| Malformed JSON | 500 on render | Validate against schema on write, not on read |
| Composer conflict | Install/upgrade blocked | Exact pin + fork with widened constraints |
| Renderer divergence | Email ≠ editor preview | Golden-file parity suite in CI |
| Abandonment | No fix for PHP/Laravel upgrade | Fork we control; interface boundary |
Ramp-up
Verdict: acceptable as an internal, forked, wrapped utility for secondary rendering paths; not acceptable as an unexamined Composer dependency on the critical path. The archived status and missing repository provenance push this from "convenient" to "you are now the maintainer."
How can I help you explore Laravel packages today?