Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image gallery for uploaded images ? #270

Closed
anuradhaindika83 opened this issue Mar 20, 2020 · 9 comments
Closed

Image gallery for uploaded images ? #270

anuradhaindika83 opened this issue Mar 20, 2020 · 9 comments
Labels
Milestone

Comments

@anuradhaindika83
Copy link

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

@MRB60
Copy link

MRB60 commented Mar 20, 2020

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?

@anuradhaindika83
Copy link
Author

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

@JiHong88
Copy link
Owner

Hi @anuradhaindika83 @MRB60
I'll add image gallery plugin.
How about adding it like this?

option - imageGalleryUrl: url
response format: [
  {src, name, size},
]

@JiHong88 JiHong88 added this to the 2.29.0 milestone Mar 20, 2020
@anuradhaindika83
Copy link
Author

yes. that'll do

@anuradhaindika83
Copy link
Author

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

@anuradhaindika83 anuradhaindika83 changed the title Image galary for uploaded images ? Image gallery for uploaded images ? Mar 22, 2020
@JiHong88
Copy link
Owner

JiHong88 commented Mar 22, 2020

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.

@anuradhaindika83
Copy link
Author

ok, will do. Thanks

@JiHong88
Copy link
Owner

JiHong88 commented Apr 2, 2020

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.

@JiHong88 JiHong88 modified the milestones: 2.29.0, 2.30.0 Apr 17, 2020
JiHong88 added a commit that referenced this issue May 28, 2020
JiHong88 added a commit that referenced this issue Jun 1, 2020
JiHong88 added a commit that referenced this issue Jun 2, 2020
JiHong88 added a commit that referenced this issue Jun 2, 2020
JiHong88 added a commit that referenced this issue Jun 3, 2020
@JiHong88 JiHong88 closed this as completed Jun 3, 2020
@JiHong88
Copy link
Owner

JiHong88 commented Jun 9, 2020

The 2.30.0 version has been updated.
If this issue has not been resolved, please reopen this issue.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants