norman-huth/nova-bbcode-textarea

Laravel Nova Textarea and Text field with BBCodes

Fund package maintenance!
huth.it/coffee

Installs: 6 933

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

Language:JavaScript

0.0.3 2022-07-02 10:28 UTC

This package is auto-updated.

Last update: 2024-04-24 20:07:48 UTC


README

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

use NormanHuth\BBCode\BBCode;

BBCode::make(__('Name'), 'name')->codes([
    '{author}' => __('This code insert the author'),
    '{date}' => __('This code insert the date'),
]),

Or Text Field:

use 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

BBCode::make(__('Name'), 'name')->codes([
    '{author}' => __('This code insert the author'),
    '{date}' => __('This code insert the date'),
])->alwaysShow(false),

Change button class

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

BBCode::make(__('Name'), 'name')->codes([
    '{author}' => __('This code insert the author'),
    '{date}' => __('This code insert the date'),
])->btnStyle('margin-bottom: 1rem'),

Stand With Ukraine Woman. Life. Freedom.