CKEditor's not working with EasyAdmin 3 on Symfony 4.4

Viewed 3575

I'm actually working on a project who needs a WYSIWYG interface with Symfony 4.4 and EasyAdmin 3.

I've tried to install FOS_CKEditor by following this doc https://symfony.com/doc/2.x/bundles/EasyAdminBundle/integration/ivoryckeditorbundle.html and some others tutorials that i've found on Google or Youtube, but unfortunatly I can't figure out why the CKEditorField does not display on my admin dashboard. I think i've been missing something.

Some help would be appreciate, here's my configs files :

Fos_ckeditor:

#config/packages/fos_ckeditor.yaml

twig:
    form_themes:
        - '@FOSCKEditor/Form/ckeditor_widget.html.twig'

fos_ck_editor:
    configs:
        basic_conf:
            toolbar: full

EasyAdmin :

#config/packages/easy_admin.yaml

easy_admin:
    design:
        form_theme:
            - "@EasyAdmin/form/bootstrap_4.html.twig"
            - "@FOSCKEditor/Form/ckeditor_widget.html.twig"

I've also tried to define the FieldType in the CrudController by adding this :

#CrudController

 public function configureFields(string $pageName): iterable
{
    return [
        ..//
        TextareaField::new('corps', 'Corps')
        ->setFormType(CKEditorType::class),

But it didn't worked.

Thanks by advance for your help !

3 Answers

Try updating the fos_ck_editor part like this :

fos_ck_editor:
    input_sync: true
    default_config: base_config
    configs:
        base_config:
            toolbar: full

For anyone still having trouble with this, after adding the line from Bouffe's comment make sure you have the assets installed with commands:

bin/console ckeditor:install
bin/console assets:install public

This worked for me on EasyAdminBundle 3 and Symfony 5 with FOSCKEditorBundle 2.

Related