helios-ag / FMElfinderBundle

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

How to insert elFinder in a page #474

Closed robertosanval closed 2 years ago

robertosanval commented 2 years ago

I'd like to know how can I insert elFinder inside a page of the site.

I've installed it and create it as a form control:

$formFinder = $this->createFormBuilder()
    ->add('elfinder', ElFinderType::class, [
        'instance' => 'default',
        'enable' => true,
    ])
    ->getForm();

But with this way the elFinder is in a popup window after click on an input text.

Is there any way to show the elFinder directly on a page without the popup window?

helios-ag commented 2 years ago

hi @robertosanval in this case you need to do this: https://symfony.com/doc/current/templates.html#embedding-controllers

and render this action https://github.com/helios-ag/FMElfinderBundle/blob/main/src/Controller/ElFinderController.php#L36 or you will need to write your own controller

robertosanval commented 2 years ago

Great! Thanks a lot @helios-ag