loongws / ueditor
UEditor 扩展程序,用于 laravel-admin
1.0
2022-03-25 11:40 UTC
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.8
- loongws/laravel-ueditor: ~1.0
Requires (Dev)
- phpunit/phpunit: ^9.5.18
This package is auto-updated.
Last update: 2024-09-25 17:07:55 UTC
README
这是一个 laravel-admin 扩展,用于将 UEditor 集成到 laravel-admin 的表单中,
安装
composer require loongws/ueditor
发布资源
php artisan vendor:publish --provider=Overtrue\LaravelUEditor\UEditorServiceProvider
配置
在 config/admin.php 文件的 extensions 中添加属于此扩展的一些配置
'extensions' => [ 'ueditor' => [ // 如果要关掉这个扩展,设置为false 'enable' => true, // 编辑器的前端配置 参考:http://fex.baidu.com/ueditor/#start-config 'config' => [ 'initialFrameHeight' => 400, // 例如初始化高度 ], // 'field_type' => '自定义名字' ] ]
后端配置 config/ueditor.php,参考
使用
组件名称可配置,默认为 UEditor
在表单中使用它:
$form->UEditor('content'); // options 中参数会覆盖 extensions.ueditor.config 中参数 $form->UEditor('content')->options(['initialFrameHeight' => 800]); // 如果 extensions.ueditor.field_type 定义为 xxxEditor // $form->xxxEditor('content');
感谢
许可
许可协议为 MIT 许可协议 (MIT)。