Suneditor: Image gallery for uploaded images ?

Created on 20 Mar 2020  路  9Comments  路  Source: JiHong88/SunEditor

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

feature

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

All 9 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dreamsight picture dreamsight  路  5Comments

BuiChiBach picture BuiChiBach  路  6Comments

crying2812 picture crying2812  路  3Comments

setesolutions picture setesolutions  路  7Comments

vn516726 picture vn516726  路  3Comments