tinymce-bundle icon indicating copy to clipboard operation
tinymce-bundle copied to clipboard

File upload working with Quick Toolbar plugin

Open RedwanK opened this issue 9 months ago • 3 comments

Hey, first of all, thank you for this bundle, it works just fine ! This is not a bug report just a topic to understand something.

I'm confused, with the Quick Toolbar plugin of TinyMCE it appears to work by itself and allow me to upload image without ANY php configuration.

Here is my conf : tinymce: plugins: "quickbars" toolbar: "bold italic underline | bullist numlist | h1 h2 h3 h4 h5 h6 blockquote | link unlink | alignleft aligncenter alignright | quickimage"

And it allows me to upload files and save everything just fine :

Image

Then if I check where the file is stored, I find this link : blob:https://127.0.0.1:8000/b1ab0bc2-1454-4aea-bd4a-e5f61b228af1

Which indicate that there's a file stored somewhere but I can't find where when I search in the server.

Do you have any idea of how this can work ?

EDIT : I didn't mentioned but I installed it on Sf 7.1.8 / Sylius 2.0.2

RedwanK avatar Mar 21 '25 17:03 RedwanK

Alright, finally I understood, its base64 storage directly in the database.

Which means, it can work if you just need something light for your application, but not the best option anyway.

Hope this can help the community.

RedwanK avatar Mar 21 '25 17:03 RedwanK

Hi @RedwanK!

Indeed, TinyMCE's default setting when nothing is configured for the uploads is to do whatever it can, which ends up being base64 encoded images right in your content.

The more sustainable approach, as you hinted at, is to set up a backend endpoint to accept these file uploads and to configure TinyMCE to use this. You can find more information here, in the File Uploads section of the readme: https://github.com/EmilePerron/tinymce-bundle#file-uploads-optional

Lastly, I just want to point out that you might want to use emileperron/tinymce-bundle instead of this package; it's a fork from myself (the original author) that is more up-to-date and that respects semantic versioning.

Hope that helps!

EmilePerron avatar Mar 21 '25 17:03 EmilePerron

Thanks for the answer !

I'll go with the "emileperron/tinymce-bundle" package then.

Have a good one

RedwanK avatar Mar 22 '25 13:03 RedwanK