mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 21:34:59 +00:00
wip.. ckeditor5
This commit is contained in:
38
Form/Extension/CKEditorExtension.php
Normal file
38
Form/Extension/CKEditorExtension.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Form\Extension;
|
||||
|
||||
use Symfony\Component\Form\AbstractTypeExtension;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* Class CKEditorTypeExtension
|
||||
*
|
||||
* @package Chill\MainBundle\Form\Extension
|
||||
* @author Mathieu Jaumotte mathieu.jaumotte@champs-libres.coop
|
||||
*/
|
||||
class CKEditorExtension extends AbstractTypeExtension
|
||||
{
|
||||
|
||||
/**
|
||||
* Return the class of the Textarea Type being extended.
|
||||
* @return iterable
|
||||
*/
|
||||
public static function getExtendedTypes(): iterable
|
||||
{
|
||||
return [TextareaType::class];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OptionsResolver $resolver
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'attr' => [
|
||||
'class' => 'ck ck-editor snippet-markdown'
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user