chentaohua/wangeditor5

wangEditor5 extension for laravel-admin

1.0.0 2022-09-19 09:50 UTC

This package is auto-updated.

Last update: 2024-04-19 13:57:03 UTC


README

Installation

composer require chentaohua/wangeditor5

php artisan vendor:publish --provider=Cth\WangEditor5\WangEditor5ServiceProvider

Configuration

In the extensions section of the config/admin.php file, add some configuration that belongs to this extension.

'extensions' => [

        // document : https://www.wangeditor.com/v5/
        'wangeditor5' => [
            // If the value is set to false, this extension will be disabled
            'enable' => true,
            'height' => '300px',

            'editor_config' => ['placeholder' => '请输入内容 ...'],
            'editor_mode' => 'simple', // or 'default'

            'toolbar_config' => [

            ],
            'toolbar_mode' => 'simple', // or 'default'
        ]
    ],

The configuration of the editor can be found in wangEditor5 Documentation.

Usage

Use it in the form form:

$form->wangEditor5('content');

License

Licensed under The MIT License (MIT).