helios-ag / FMElfinderBundle

:file_folder: ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
MIT License
275 stars 128 forks source link

ElFinderType in EasyAdmin #406

Closed Luvelnet closed 3 years ago

Luvelnet commented 4 years ago

Hi!

I have been trying to use Elfinder in Easyadmin but with no results. I've created a new "Collection" field using ElFinderType, but all it shows me is a normal input text.

- { property: 'images', type: 'collection', label: 'Images', type_options: { allow_add: false, allow_delete: false, entry_type: 'FM\ElfinderBundle\Form\Type\ElFinderType' }}

2020-04-14 17_23_26-Window

Anyone who can help me?

Thanks!

Lyudmil-Bozhkov commented 4 years ago

Hello i've been trying to do almost the same, did you find any solution?

Lyudmil-Bozhkov commented 4 years ago

Hello!

I was able to find a solution by adding the twig form template to easy_admin.yaml

design:
    form_theme:
      - '@EasyAdmin/form/bootstrap_4.html.twig'
      - '@FMElfinder/Form/elfinder_widget.html.twig'

Hope that this will help someone.

helios-ag commented 3 years ago

Added to docs in https://github.com/helios-ag/FMElfinderBundle/commit/7258d7f738e2b0c88fa4740a14ad7c7eadc24327 Thanks for contribution.