froala / KMSFroalaEditorBundle

Symfony bundle for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
105 stars 33 forks source link

Support for EasyAdminBundle #40

Closed xpersonas closed 6 years ago

xpersonas commented 6 years ago

I have been liking the EasyAdminBundle for quickly setting up an admin with crud operations. They have instructions for adding ckeditor, but Froala is far superior.

https://github.com/javiereguiluz/EasyAdminBundle

This is a feature request, unless this can already be done and I'm just failing, to be able to add Froala integration with forms generated by EasyAdminBundle.

sguionni commented 6 years ago

According the documentation, you juste have to setup correctly EasyAdmin with Froala type :

https://symfony.com/doc/current/bundles/EasyAdminBundle/integration/ivoryckeditorbundle.html#using-the-rich-text-editor

What is the error ?

xpersonas commented 6 years ago

Yeah, that's what I was thinking. But no matter what "type" I try in the EasyAdmin config, I get an error...

Could not load type "froala"

I tried using "froala", "FroalaEditorType", and a couple of other long shots. But seems it should just be "froala".

`InvalidArgumentException in vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php (line 85)

FormRegistry->getType('froala') in vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php (line 74) `

I should add that Froala is working and functioning on my custom CRUD pages that I created outside of EasyAdmin. So I know it is installed correctly.

sguionni commented 6 years ago

Can you please try with this type (if you're using Sf 3 or 4) : "KMS\FroalaEditorBundle\Form\Type\FroalaEditorType"

xpersonas commented 6 years ago

That worked. Thank you! I'm an idiot. I had tried "KMS\FroalaEditorBundle\Form\Type" earlier, but forgot to actually have the name at the end. Thank you for taking the time to troubleshoot that with me.