I need to use a wysiwyg editor on my website. I use symfony 4.
I've tried to use ckeditor 5 CDN (https://ckeditor.com/ckeditor-5/download/)
The view works well but the symfony form is not submitted. (the textareatype may kills the form because with ckeditor it is changed into many divs and the textarea section may be considered blank)
this is the code of the textarea which is in the form.
->add('content', TextareaType::class, [
'label' => "Content label",
'required' => true,
'attr' => [
'class' => "ckeditor"
]
])
and the code of the script
<script>
ClassicEditor
.create( document.querySelector( '.ckeditor' ) )
.catch( error => {
console.error( error );
} );
</script>
Thanks. it's hopeless how it's difficult to use a simple wysiwyg editor ..