jxlwqq / simditor
Simditor for Laravel-admin
1.0.4
2020-11-20 05:26 UTC
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.6
Requires (Dev)
- phpunit/phpunit: ~6.0
README
这是一个 laravel-admin
扩展,它将 Simditor 集成到 laravel-admin
表单中。
屏幕截图
安装
composer require jxlwqq/simditor php artisan vendor:publish --tag=laravel-admin-simditor
配置
在 config/admin.php
文件的 extensions
部分,添加属于此扩展的一些配置。
'extensions' => [ 'simditor' => [ // Set to false if you want to disable this extension 'enable' => true, // Editor configuration 'config' => [ 'upload' => [ 'url' => '/admin/api/upload', # example api route: admin/api/upload 'fileKey' => 'upload_file', 'connectionCount' => 3, 'leaveConfirm' => 'Uploading is in progress, are you sure to leave this page?' ], 'tabIndent' => true, 'toolbar' => ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'], 'toolbarFloat' => true, 'toolbarFloatOffset' => 0, 'toolbarHidden' => false, 'pasteImage' => true, 'cleanPaste' => false, ] ] ]
编辑器的配置可以在 Simditor 文档 中找到。
用法
在表单中使用它
$form->simditor('content');
更多资源
许可证
许可协议为 MIT 许可证 (MIT)。