mr4-lax / tiny-mce
Laravel 管理后台表单 TinyMCE
0.0.1
2023-07-21 03:13 UTC
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.6
Requires (Dev)
- phpunit/phpunit: ~6.0
README
这是一个 laravel-admin
扩展,可以将 TinyMCE 6 集成到 laravel-admin
表单中。
屏幕截图
安装
composer require mr4-lax/tiny-mce php artisan vendor:publish --tag=mr4-lax-tinymce --force
配置
在 config/admin.php 文件的扩展部分,添加属于此扩展的配置。
'extensions' => [ 'mr4lax' => [ // If the value is set to false, this extension will be disabled 'enable' => true, 'tinymce' => [ 'editor' => [ 'plugins' => 'table lists link image media wordcount', 'toolbar' => 'undo redo | formatselect| bold italic underline strikethrough forecolor backcolor | alignleft aligncenter alignright alignjustify | indent outdent | bullist numlist | code | table | image media link', ], 'editor' => [ 'upload' => 'mr4.lax.tinymce.upload', 'store' => 'public/mr4lax/tinymce', ], ], ], ],
编辑器的插件和工具栏配置可以在 TinyMCE 文档 中找到。
使用方法
在表单中使用它
$form->tinymce('content') ->rows(5) ->attribute([ 'menubar' => 'true', 'statusbar' => 'true', ]);
许可证
在 The MIT 许可证 (MIT) 下许可。