Use CKEditor 5 for description editing.

This commit is contained in:
Jan Böhmer 2022-07-26 01:20:58 +02:00
parent a4f07e9b82
commit 63b7e0458c
11 changed files with 527 additions and 75 deletions

View file

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace App\Form;
use App\Entity\LabelSystem\LabelOptions;
use App\Form\Type\RichTextEditorType;
use FOS\CKEditorBundle\Form\Type\CKEditorType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
@ -100,13 +101,13 @@ class LabelOptionsType extends AbstractType
],
]);
$builder->add('lines', CKEditorType::class, [
$builder->add('lines', RichTextEditorType::class, [
'label' => 'label_profile.lines.label',
'empty_data' => '',
'output_format' => 'html',
'attr' => [
'rows' => 4,
],
'config_name' => 'label_config',
]);
$builder->add('additional_css', TextareaType::class, [

View file

@ -18,7 +18,7 @@ class RichTextEditorType extends AbstractType
$resolver->setAllowedValues('mode', ['full', 'single_line']);
$resolver->setDefault('output_format', 'markdown');
$resolver->setAllowedValues('output_format', ['markdown']);
$resolver->setAllowedValues('output_format', ['markdown', 'html']);
}
public function getBlockPrefix()