composer require chentaohua/wangeditor5
php artisan vendor:publish --provider=Cth\WangEditor5\WangEditor5ServiceProvider
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.
Use it in the form form:
$form->wangEditor5('content');
Licensed under The MIT License (MIT).