Plone 4.1.
What would be the easiest way to make TinyMCE image picker dialog point to a site default folder (/image-bank) instead of current folder?
This + folder display as album would provide a rudimentary image bank support for Plone easily.
I'd hope to achieve this feature for
If it's difficult to edit Python code all over the places, it's accetable just to a Javascript snippet patching TinyMCE settings on the client side.
Mikko: What a coincidence. I'm just trying to achieve the same thing. I managed to create a more specific adapter than `Products/TinyMCE/adapters/Upload/Upload
`.
This new adapter changes the upload folder (by setting self.context
) to the central-images-folder and then updates radio button listing (and image preview) with the central-folder images (and just uploaded image). This is done by defining an uploadOk
method inside the new adapter.
However, to change the initial folder, I think the only way is to customize ploneimage.html.pt
or ploneimage.js
inside the skins/tinymce/plugins/ploneimage
folder. But changing any of these two large files (which might change in the future), could make new releases of TinyMCE not to work with your changes. So you will be forced to re-customize them again.
My idea (which I already emailed this morning to Four Digits) is to provide this feature with TinyMCE out-of-the-box, via a configuration option. This way the package files would be always aware of this feature and future changes won't harm this new functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With