webplusmultimedia/la-tiny-editor

Tiny MCE Editor for Little Admin

v0.9.3 2023-09-20 12:25 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

TinyMce plugin for Little Admin. S-lection-004.png

Support us

Coming soon

Installation

You can install the package via composer:

composer require webplusmultimedia/la-tiny-editor

Publish the assets:

php artisan vendor:publish --tag=la-tiny-editor-assets

Publish the config file with:

php artisan vendor:publish --tag="la-tiny-editor-config"

Then, add some profile to use with tinyMce:

return [
    'profiles' => [
    ...
        'myconf' => [
                'plugins' => 'autolink link code',
                'toolbar' => 'undo redo | bold italic underline | link | removeformat code brbtn',
            ],
    ...     
    ]
];

Usage

In the resource file of little Admin

public static function getFormSchema(Form $form): Form
    {
        return $form
            ->schema([
                LaTinyEditor::make('extrait')
                    ->nullable()
                    ->profile('myconf')
                    ->required(),
                LaTinyEditor::make('texte')
                    ->nullable()
                    ->helperText('Texte d\'apprentissage')->required(),
            ]);
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.