mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 19:34:54 +02:00
Use CKEditor 5 for description editing.
This commit is contained in:
parent
a4f07e9b82
commit
63b7e0458c
11 changed files with 527 additions and 75 deletions
|
@ -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, [
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue