Hi,
It would be much helpful if you can add an image gallery for uploaded images. You can take a Rest API to get the image data and show it to the users. So users can insert that image by just selecting it.
Thanks
Anuradha
Nice suggestion.
Do you have an idea how this could work? I have multiple users uploading images but they are only allowed to view their own images. At the moment I use Mysql in the backend to keep track of image uploads per user (using session which is not accessible by Suneditor).
One solution could be to add yet another common tag (UUID4 coded?) to each image indicating "owner" (security by obscurity). Tag could then be set in config. Such a solution could perhaps be a potential security problem unless checks are forced on the backend.
Do other editors have this feature and how did they solve it?
Yep, I'm storing image URLs in the MySQL backend at the moment. But in my case, users need to authenticate before accessing the editor.I'm making the API endpoint dynamic by adding a UUID as a path parameter
Hi @anuradhaindika83 @MRB60
I'll add image gallery plugin.
How about adding it like this?
option - imageGalleryUrl: url
response format: [
{src, name, size},
]
yes. that'll do
I have created a plugin for this.
https://github.com/anuradhaindika83/suneditor-gallery-plugin
It is a basic one. but it does the job.
Thanks
Anuradha
Hi
Thank you for your great work!
I think gallery looks better to call from image modal.
I'll define a specification to add a module plugin and an external plugin.
After that, can you create a PR for the gallery plugin?
Defining how to add an external module, the button icon or adding method will be simpler.
ok, will do. Thanks
Hi @anuradhaindika83 @MRB60
The method of adding of the custom plugin has been improved. #custom_plugins
You can add a button like the default plugin.
I will now implement an image gallery.
The 2.30.0 version has been updated.
If this issue has not been resolved, please reopen this issue.
Thank you.
Most helpful comment
I have created a plugin for this.
https://github.com/anuradhaindika83/suneditor-gallery-plugin
It is a basic one. but it does the job.
Thanks
Anuradha