nicolassing/quill-bundle
最新稳定版本:v1.3
Composer 安装命令:
composer require nicolassing/quill-bundle
包简介
A Symfony bundle that integrates Quill as a drop-in replacement for textarea Symfony form.
README 文档
README
This bundle integrate quilljs in your Symfony project.
Installation
Add the nicolassing/quill-bundle package to your require section in the composer.json file.
$ composer require nicolassing/quill-bundle
Usage
Configure quill client(s) in your config/packages/nicolassing_quill.yaml:
nicolassing_quill: theme: snow height: 10rem
There is 2 themes available
- snow (default)
- bubble
Add a quill widget into your form
namespace App\Form\Type; use Symfony\Component\Form\AbstractType; use Nicolassing\QuillBundle\Form\Type\QuillType; use Symfony\Component\Form\FormBuilderInterface; class FooType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('bar', QuillType::class) ; } }
Add javascript and stylesheet in your twig template
<!-- Include stylesheet --> <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet"> {{ form_row(form.bar) }} <!-- Include the Quill library --> <script src="https://cdn.quilljs.com/1.3.6/quill.js"></script> <script src="bundles/nicolassingquill/js/nicolassing_quill.js"></script>
Contributing
Before submitting a Pull Request please check all tests pass
vendor/bin/php-cs-fixer fix .
vendor/bin/simple-phpunit
统计信息
- 总下载量: 12.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-19