fotobank / simplemde
用于laravel-admin的Simplemde markdown编辑器扩展
v1.02
2019-11-24 15:12 UTC
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.6
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-09-25 02:22:41 UTC
README
Simplemde 是一个优秀的markdown编辑器,此扩展用于将 Simplemde
集成到 laravel-admin
表单中。
屏幕截图
安装
composer require fotobank/simplemde
然后
php artisan vendor:publish --tag=laravel-admin-simplemde
配置
在 config/admin.php
文件的 extensions
部分中,添加此扩展的一些配置。
'extensions' => [ 'simplemde' => [ // Set to false if you want to disable this extension 'enable' => true, // If you want to set an alias for the calling method //'alias' => 'markdown', // Editor configuration 'config' => [ ] ] ]
编辑器的配置可以在 Simplemde 文档 中找到
'config' => [ 'autofocus' => true, 'placeholder' => 'xxxx', .... ]
使用方法
在表单中使用它
$form->simplemde('content');
设置高度
$form->simplemde('content')->height(500);
如果配置中指定了方法别名是 markdown
$form->markdown('content');
捐赠
通过捐赠一小笔钱来帮助项目持续发展。提前感谢。
许可证
在 MIT 许可证 (MIT) 下授权。