Open VangelisP opened 1 year ago
Mm, this is odd, I did manage to find the issue (or so I think!)
The lines that fill in the values here: https://github.com/DiemenDesign/summernote-image-attributes/blob/master/summernote-image-attributes.js#L298-L303
should have .val('')
instead of .val()
,
for example: $linkHref.val();
should become $linkHref.val('');
Do we actually trying to get the values on those lines or set them as empty ? Maybe I misunderstood.
Doing that, I've managed to get the plugin to behave properly on multiple images. Can someone confirm?
This is what happened, at least in my case (Summernote v0.8.20) :
OK
on the dialog form, the HTML code will be updated with the same Link URL of the first image.My belief is that the plugin reads the imgLink data (thus the URL and the rest of the variables) of the first image it can find and populates the dialog form without checking which image it should be reading.
Here is a short video of it. The first image had the Link URL
https://google.com
while the second image had that property empty.https://github.com/DiemenDesign/summernote-image-attributes/assets/14973113/33d7ed84-bee4-4ac3-b1cf-2f56a842c9a4
Upon saving the second image's dialog form, code was being updated (it shouldn't have the URL at all!)