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

Nova Bbcode Textarea Laravel Package

norman-huth/nova-bbcode-textarea

A Laravel Nova field that adds a BBCode-ready textarea to your admin forms, making it easy to edit and manage BBCode-formatted content within Nova resources. Lightweight and simple to integrate into existing packages.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is archived and unmaintained (last release July 2022), so treat it as a legacy dependency rather than something to reach for on a new build. If you are working in an existing Nova app that already depends on it, the workflow is:

  1. Confirm the installed Nova version matches what the field was built for. The package predates Nova 5 and likely targets Nova 3.x/4.x. Attempting to install it into a current Nova app will usually fail Composer resolution before you even get to runtime.
  2. Install with composer require norman-huth/nova-bbcode-textarea (or clone/fork into a path repository if Packagist resolution breaks).
  3. Add the field to a resource:
use NormanHuth\NovaBbcodeTextarea\BbcodeTextarea;

public function fields(Request $request)
{
    return [
        BbcodeTextarea::make('Body', 'body')
            ->rules('required', 'string', 'max:65535')
            ->help('BBCode is supported: [b], [i], [url], [quote]'),
    ];
}
  1. Make sure the underlying column is text/mediumText, not varchar(255).

The first realistic use case is a forum/post/comment resource where you want contributors to write light markup without a full WYSIWYG, and you render the BBCode to HTML separately on the frontend.

Implementation Patterns

Separate storage from rendering. The field should be treated purely as a form control that persists a raw BBCode string. Do the BBCode→HTML conversion in your application layer (a parser such as laravel-bbcode/symfony-style parser or a custom transformer), then sanitize the resulting HTML before output. Never render the stored value with {!! !!} directly.

Detail and index views. Raw BBCode in a detail view is noisy. If the field supports it, use ->asHtml() or render a parsed preview; otherwise hide it on index (->hideFromIndex()) or transform via ->displayUsing(fn ($v) => Str::limit(strip_tags($parsed), 120)).

Validation belongs in the field. Use Nova's ->rules() and ->nullable() rather than relying on the request-level form request, because action forms and inline resource creation won't go through your controller validation.

Actions and tools. Drop the field into action modal forms and custom Nova tools the same way you would any other Nova field. Keep the field name identical to the model attribute so Nova's mass-assignment/fill logic works without a custom fillUsing.

Frontend integration tip. Because the model attribute is just a string, you can render it in Blade partials, API resources, or Inertia props after a single parser call. Centralize the parse+sanitize step in one presenter/service so the editor, detail view, and public site agree on supported tags.

Migration pattern for an existing Textarea field. Swap the class in fields(), keep the same column and validation, and backfill nothing — BBCode and plaintext coexist in the same column harmlessly if your renderer escapes unknown plaintext.

Gotchas and Tips

  • Archived = frozen. There will be no Nova 5 compatibility work, no security patches, and no PHP 8.2/8.3 fixes. If you must keep it, fork it, lock the Composer constraint, and plan a migration path to a maintained editor (Tiptap, Filament-style Markdown, or Nova's native Textarea plus a client-side renderer).
  • Composer conflicts are the likely first failure. The package's composer.json will constrain laravel/nova and php to old ranges. Expect to need --ignore-platform-reqs (bad idea in production) or a fork with loosened constraints.
  • XSS is the real risk. BBCode is not a security boundary — [url=javascript:...] and [img] tags are classic vectors. Always sanitize the HTML after parsing, and consider an allow-list of tags.
  • Asset publishing / caching. Nova fields ship JS/CSS. If the editor doesn't appear, run php artisan nova:publish, clear config/cache, and check the browser network tab for a 404 on the field's compiled assets. Nova 4+ uses Vite-built assets; older tooling may not register correctly.
  • showOnDetail surprises. A raw-BBCode textarea on the detail screen is often the "why does this look broken" bug report. Default it off on index and detail unless you explicitly want the raw source visible.
  • Extension points are limited. Because it's archived, don't count on config files or field methods beyond the basic Nova field API. Anything editor-specific (toolbar buttons, tag set) will require editing the package's Vue component directly — another reason to fork.
  • Debugging field registration. If Nova throws "Unknown field" or the class isn't resolved, verify the namespace in the use statement and that the package's service provider is auto-discovered (php artisan package:discover). For path-repo installs, re-run discovery after every change.
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.
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings