A
A
Alexander2019-01-15 12:02:09
symfony
Alexander, 2019-01-15 12:02:09

How should a symfony controller designed to work with the CKEditor bundle look like?

Hello dear community!
I'm trying to install FOS\CKEditorBundle for the admin panel (no bundles, simple logic)
Installed the bundle, registered it, connected it - it works
Now I'm trying to use the ability to insert an image in the editor
I created a separate controller, registered a route and added this route to the editor config
filebrowserUploadRoute: "media_upload"
registered route, everything is OK
But what should be in the controller itself, I just can’t understand, I didn’t find anything in the docks, logically, I have to paint this matter myself, but I can’t understand how, what should be there? How is the download handled?
Can you post an example?
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Ma3ypok, 2019-01-15
@Ma3ypok

There is also a whole topic on the site with all the options - How to handle file browse/upload

D
dosim86, 2019-01-24
@dosim86

In theory, you need to get the image loaded through CKEditor in the controller, process it, save it and return the link back to CKEditor. Next, CKEditor should insert the link into the editor. Also try to attach responsive filemanager to CKEditor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question