- What does the Nova HTML code field package do?
- It is a Laravel Nova custom field that replaces the default textarea with a syntax-highlighted editor for writing raw HTML and code directly in Nova resource forms and detail views. It stores markup verbatim and does not transform or render it, so it is purely an editing surface. It is intended for teams that have already standardized on Nova as their admin panel.
- How do I install the Nova HTML code field?
- Require interaction-design-foundation/nova-html-code-field with Composer, then add the field to a resource's fields() method. No migrations, service provider bootstrapping, queues, or runtime footprint are involved. A developer already comfortable with Nova can typically complete the integration in hours rather than weeks.
- Does it support Nova 5, and can I still use it on Nova 4?
- Release 2.2.0 added Nova 5 support, so current versions target Nova 5. Whether the Composer constraint widened to ^4|^5 or was bumped to Nova 5 only is not confirmed by the available notes, so teams still on Nova 4 should inspect composer.json before upgrading. Because the field depends on Nova's closed-source field and asset-registration APIs, every Nova major release is a potential forced upgrade.
- Do I need migrations or service providers to use this field?
- No. The package adds only a Nova field; it does not ship a migration, service provider, route, or model change. You map the field onto an existing text, longText, or json column on your resource's model. That keeps the field swappable later without a data migration.
- Does the field sanitize or validate the HTML I store?
- No. The field stores raw HTML verbatim and does not sanitize, validate, transform, or render it. XSS risk lives in how your application renders the stored markup, so a render-time sanitization policy using something like HTMLPurifier or DOMPurify is a hard prerequisite before production use. Treat defining an HTML trust policy as part of adoption, not an optional extra.
- What database column types does the field work with?
- It maps onto an existing text, longText, or json column, and the content stays plain HTML in the database. Because nothing is transformed on write, you can swap the field out later without a data migration, which makes the decision reversible. Confirm the column can hold the size of markup your editors will realistically produce.
- Which editor library powers the field, and does it work with a strict Content Security Policy?
- The available documentation does not name the underlying editor, so confirm whether it is CodeMirror, Ace, or something else before committing. The editor's JavaScript and CSS ship through Nova's asset publishing pipeline, which can silently break after Nova upgrades or under a strict Content-Security-Policy. Test the field in a staging environment that mirrors your production CSP headers.
- Does the field provide an HTML preview?
- Yes. The field pairs the syntax-highlighted editor with an HTML preview so you can check markup without leaving the Nova form. That preview is part of the developer-friendly editing interface, not a rendering pipeline for your front end. Production output should still be rendered through your own sanitized Blade views.
- Is the package actively maintained, and what happens if it is abandoned?
- It is published by the Interaction Design Foundation rather than a vendor with an SLA, and the user base is thin, so there is limited community backstop if it stalls. Release 2.2.0 shows it tracks Nova releases, but check issue response times and release cadence before relying on it. The package is MIT licensed, so a fork-and-patch contingency is viable.
- What are the alternatives if I don't want raw HTML editing in Nova?
- Alternatives include Nova's native text and textarea fields, other community code-style Nova fields, or a WYSIWYG editor if your authors are semi-technical rather than developers. Raw markup editing only makes sense when the people writing the HTML are technical. It is also worth asking whether a full HTML content pipeline belongs in Nova at all.