1. Go to this page and download the library: Download ehyiah/ux-quill library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ehyiah / ux-quill example snippets
use Ehyiah\QuillJsBundle\Form\QuillType;
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ...
->add('myField', QuillType::class)
;
}
use Ehyiah\QuillJsBundle\Form\QuillType;
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ...
->add('myField', QuillType::class, [
'quill_extra_options' => [
'height' => '780px',
'theme' => 'snow',
'placeholder' => 'Hello Quill WYSIWYG',
],
'quill_options' => [
// this is where you customize the WYSIWYG by creating one or many Groups
// if you create many groups, they will be separated by a space in the toolbar
// you can also build your groups using a classic array but many classes are covering every Quill available Fields (see below for detailed list)
QuillGroup::build(
new BoldField(),
new ItalicField(),
// and many more
),
QuillGroup::build(
new HeaderField(HeaderField::HEADER_OPTION_1),
new HeaderField(HeaderField::HEADER_OPTION_2),
// and many more
),
// Or add all built-in available fields at once
QuillGroup::buildWithAllFields()
]
])
;
}
return new JsonResponse('https://my-website/public/assets/my-uploaded-image.jpg');
'modules' => [
new SyntaxModules(),
new TableModule(
'menus' => ['column', 'row', 'merge', 'table', 'cell', 'wrap', 'copy', 'delete'],
'toolbarTable' => 'true', // must be set to true to show the table toolbar options in TableModule
'language' => 'fr_FR',
),
],
php
use Ehyiah\QuillJsBundle\Form\QuillType;
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ...
->add('myField', QuillType::class, [
'attr' => [
'data-controller' => 'quill-extended', // if you named your controller quill_extended_controller.js
]
// ...
;
}
public function configureAssets(Assets $assets): Assets
{
$assets->addAssetMapperEntry('quill-admin');
return parent::configureAssets($assets);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.