雪软 / ckeditor
将 CKEDITOR 集成到 laravel-admin 中
v1.0.3
2023-01-27 10:55 UTC
Requires
- php: >=8.0.0
- snowsoft/laravel-admin: >=1.6
Requires (Dev)
- phpunit/phpunit: ~6.0
README
这是一个 laravel-admin
扩展,用于将 CKEDITOR
集成到 laravel-admin
表单中。
截图
安装
composer require snowsoft/ckeditor
然后
php artisan vendor:publish --tag=laravel-admin-ckeditor
配置
在 config/admin.php
文件的 extensions
部分中,添加属于此扩展的配置。
'extensions' => [ 'ckeditor' => [ //Set to false if you want to disable this extension 'enable' => true, // Editor configuration 'config' => [ ] ] ]
编辑器的配置可以在 CKEditor 文档 中找到,例如配置语言和高度。
'config' => [ 'lang' => 'zh-CN', 'height' => 500, ]
使用方法
在表单中使用它
$form->ckeditor('content'); // Set config $form->ckeditor('content')->options(['lang' => 'fr', 'height' => 500]);
许可证
在 MIT 许可证 (MIT) 下授权。