https://github.com/muetze42/nova-bbcode-textarea
With this Nova field you have the Textarea or Text with BBCodes.
https://github.com/muetze42/nova-bbcode-textarea
bbcode laravel laravel-nova laravel-nova-field nova-4 nova-fields
Last synced: 2 months ago
JSON representation
With this Nova field you have the Textarea or Text with BBCodes.
- Host: GitHub
- URL: https://github.com/muetze42/nova-bbcode-textarea
- Owner: Muetze42
- License: mit
- Created: 2022-04-16T21:25:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-24T17:33:39.000Z (over 2 years ago)
- Last Synced: 2025-04-11T10:18:12.198Z (2 months ago)
- Topics: bbcode, laravel, laravel-nova, laravel-nova-field, nova-4, nova-fields
- Language: JavaScript
- Homepage: https://novapackages.com/packages/norman-huth/nova-bbcode-textarea
- Size: 96.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nova Textarea- & Text field with BBCodes
Quickly developed. Short tutorial.With this Nova field you have the _Textarea_ or _Text_ with _BBCodes_.
(Tested with Nova 4)
## Install
```
composer require norman-huth/nova-bbcode-textarea
```## Usage
```phpuse NormanHuth\BBCode\BBCode;
BBCode::make(__('Name'), 'name')->codes([
'{author}' => __('This code insert the author'),
'{date}' => __('This code insert the date'),
]),
```
Or Text Field:
```phpuse NormanHuth\BBCode\BB;
BB::make(__('Name'), 'name')->codes([
'{author}' => __('This code insert the author'),
'{date}' => __('This code insert the date'),
]),
```### Don't always show the content of textarea fields inside Nova
```php
BBCode::make(__('Name'), 'name')->codes([
'{author}' => __('This code insert the author'),
'{date}' => __('This code insert the date'),
])->alwaysShow(false),
```### Change button class
```php
BBCode::make(__('Name'), 'name')->codes([
'{author}' => __('This code insert the author'),
'{date}' => __('This code insert the date'),
])->btnClass('px-2 bg-white-200 text-dark-800'),
```### Add inline style to the button
```php
BBCode::make(__('Name'), 'name')->codes([
'{author}' => __('This code insert the author'),
'{date}' => __('This code insert the date'),
])->btnStyle('margin-bottom: 1rem'),
```[](https://vshymanskyy.github.io/StandWithUkraine/)
[](https://linktr.ee/CurrentPetitionsFreeIran)