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

[Plugin improvement] Summernote editor - dropdown box with image file names #125

Open
FrankJD opened this issue Mar 30, 2019 · 27 comments
Open

Comments

@FrankJD
Copy link

FrankJD commented Mar 30, 2019

I would like to see uploaded image types in a dropdown box in summernotes "insert image" dialog.

@robiso robiso changed the title [Feature request] summernotes - dropdown box with image file names [Feature request] Summernote editor - dropdown box with image file names Mar 31, 2019
@notcarbide
Copy link

@robiso what is the status of 'insert image' on the development branch?

Looking back, it seems it was removed, but I still see the options listed in the js file.

Would there be a way of bringing that option back, but editing the dialog that comes up upon selection? Or would this require a fork? Was having a bit of trouble following where our summernote was in relation to the origin.

@robiso
Copy link
Collaborator

robiso commented Apr 6, 2019

@notcarbide, the "insert image" is there, but it only allows the user to enter the URL of an image (that can be fetched from Settings -> Files (right click and copy image URL).

As you noticed, we used to have a list of the already uploaded.
The files fetching functionality (developed by an open source contributor) contained a vulnerability, which I was unable to fix properly.

Thus, that functionality was removed upon contacting the developer with no response received.
I wouldn't mind this being implemented properly, though.

Would there be a way of bringing that option back, but editing the dialog that comes up upon selection?

I'm not sure I understand completely, can you re-phrase the question please?
Here's the link to the first repo the open source dev first provided with the Summernote editor: https://github.com/prakai/wcms-summernote

@notcarbide
Copy link

Ah, okay. My current test build generated from the devFixes branch (using the builder) doesn't seem to have the "insert image" button at all. That's why the question was confusing lol.

I wonder if fixing the latest issue I made would solve that. Since it's the only difference in deploying a build vs cloning the project, as far as I know. I can see about trying the latter and verify later today.

@robiso
Copy link
Collaborator

robiso commented Apr 6, 2019

Good catch, this was already fixed in 2.7.0 but didn't apply it to the devFixes yet.
It's now been pushed to the devFixes branch with the following commit: 48f79e9

I can now successfully see the "insert image" and similar functionality in the toolbar. Let me know how it worked for you.

Edit: this commit is not to be confused with the old used file.php which enabled anyone to list all the files on your server.

@StephanStanisic
Copy link

I have tried to update the original file.php so it is atleast save for exposure to the outside world.
A (draft) pull request with more info is here: robiso/summernote-editor#3

@RarogCmex
Copy link

RarogCmex commented May 21, 2020

Standalone summernote editor has missing ordered list functionality. In air version ordered lists present

@robiso
Copy link
Collaborator

robiso commented May 22, 2020

@RarogCmex Summernote has been updated to include the ordered/unordered list functionality.
Update to 3.0.9 to see them.

Thanks for the heads up.

@RarogCmex
Copy link

@robiso That's strange, I'll succesfully updated to 3.0.9 but still does not have ordered list functionality. Are you sure all's ok?
I've tried to remove, then reinstall but that's has no effect

@robiso
Copy link
Collaborator

robiso commented May 22, 2020

@RarogCmex, just updated it myself to 3.0.9 and the additional icons are there.
Please make sure to clear your cache, as the .js file was updated (had to clear it myself).

To verify, you can open the admin.js file in the Summernote plugin folder to verify the paragraph section is there ['para', ['ul', 'ol', 'paragraph']].

You can try opening it via example.com/plugins/summernote-editor/js/admin.js and if it's not updated, re-check it via SSH/FTP to see the uncached state of the file

@RarogCmex
Copy link

Even stranger :) I've checked that file updated successfully, but still don't see icons.
Screenshot_20200522_145149

@RarogCmex
Copy link

Where I should clear cache?

@robiso
Copy link
Collaborator

robiso commented May 22, 2020

@RarogCmex, did you check the file via the browser or via SSH?

@RarogCmex
Copy link

Via ssh.

@robiso
Copy link
Collaborator

robiso commented May 23, 2020

First, just try to visit your website and login in your browser private mode to see if it's an actual caching issue.

To clear your cache:
On Firefox (https://support.mozilla.org/en-US/kb/clear-cookies-and-site-data-firefox)

  • Click the menu button Fx57Menu and select Preferences.
  • Select the Privacy & Security panel and go to the Cookies and Site Data section.
  • Click the Clear Data… button. The Clear Data dialog will appear.
  • Check just the cached Web Content (to remove stored images, scripts and other cached content) should both be check marked.
  • Click Clear.

On Chrome (https://support.google.com/accounts/answer/32050?co=GENIE.Platform%3DDesktop&hl=en)

  • On your computer, open Chrome.
  • At the top right, click More.
  • Click More tools.
  • Next to "Cookies and other site data" and "Cached images and files," check the boxes.
  • Click Clear data.

@RarogCmex
Copy link

RarogCmex commented May 23, 2020

@robiso Thanks, solved :)
Sometimes I'll learn Haskell enought to write my own replacement for that editor. But that's not been this time yet.

@robiso
Copy link
Collaborator

robiso commented May 23, 2020

@RarogCmex, even though a replacement can work, caching issues are something you might run into often if your server is behind a CDN/caching system or something like CloudFlare.

Also, glad clearing the cache made it work as expected, no problem at all.

@robiso
Copy link
Collaborator

robiso commented Jul 19, 2020

@StephanStanisic I believe you were working on this a while ago? Is there any chance it could be included (I honestly forgot what the state of that feature was).

@StephanStanisic
Copy link

Yes, it should be working but further testing of the fix is required before we put it online. We should also either bundle jQuery + bootstrap + font awesome with the plugin since they aren't available in all themes (eg. watercolor). Or maybe pick a new editor that doesn't have bootstrap as a dependency.

The repo is here: https://github.com/StephanStanisic/summernote-editor

@Imerion
Copy link

Imerion commented Aug 14, 2020

This feature is one of the few ones I miss from the fantastic WonderCMS. It would be very practical to have. Can I help with testing it somehow?

@StephanStanisic
Copy link

The current state of the plugin should be working in this pull request: robiso/summernote-editor#3

It is currently waiting for a security checkup by someone, I'll see if I can do that next week.

It would be awesome if you could test out the updated version! A lot of things have changed in core since the pull request, so I am guessing some things are broken.

@Imerion
Copy link

Imerion commented Aug 15, 2020

Nice! I'll help. Should I test it now or after you have got the security checkup? Also, I have only checked out ordinary repos before, how would I go about getting the repo with the pull request added?

@StephanStanisic
Copy link

If you look at the pull request, I'm asking to merge StephanStanisic:master into robiso:master. You can click on StephanStanisic:master to go to the repo I'm trying to merge, StephanStanisic/summernote-editor

I'll do the checkup this week when I have time, but I'm pretty sure some things will be broken since it was quite some time ago we've worked on this.

@Imerion
Copy link

Imerion commented Aug 18, 2020

Thanks! I installed it manually, removing the existing plugin and extracting the current files from StephanStanisic/summernote-editor from April 7, but I see no difference. Adding an image still only shows the "URL of image or document" field. Perhaps I did something wrong. The summernote editor plugin says "Installed version: 3.0.7" but I can update to 3.0.9. Weird thing is that now Summernote editor is listed twice in my Plugins-section even though I deleted the previously installed version first. The second copy can not be updated however. Sorry if I'm just confusing you, I might not be the best person to do this testing, but I really do want to help. :)

@Imerion
Copy link

Imerion commented Aug 18, 2020

Ok, I think I got the correct one installed now! You can disregard the last post.

Now it's obvious things aren't working though. For one the background and some of the graphics are missing (see here Screenshot_2020-08-18_03-00-37

It is also almost impossible to click the buttons because the whole editor section keeps resizing, cycling through three size steps, when hovering over the buttons with the cursor.

@StephanStanisic
Copy link

Ah, I see that there are new changes on robiso:master, ill merge them into the pull request. That will probably fix this issue.

@robiso
Copy link
Collaborator

robiso commented Sep 14, 2020

@StephanStanisic bumping this, can you please ping me when it's ready to be run for a test?

@robiso
Copy link
Collaborator

robiso commented Mar 25, 2021

Adding a note here, from OneLaptopMan from community:

Yeah, Summernote integration would be great, in fact having the whole process (drag image -> auto uploads -> auto embed -> set alt text) would be great too. I'm just thinking of the easiest way my clients could populate a gallery without having a monstrous amount of base64 code filling the JSON file and having an actual file with useful meta data src set and all that good stuff available.

@robiso robiso pinned this issue Jul 25, 2022
@robiso robiso changed the title [Feature request] Summernote editor - dropdown box with image file names [Plugin improvement] Summernote editor - dropdown box with image file names Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants