DennisSuitters / summernote-image-attributes

Summernote plugin to edit image attributes
MIT License
89 stars 89 forks source link

Multiple summernote implementations breaks plugin #59

Closed davelassanske closed 2 years ago

davelassanske commented 4 years ago

Since the plugin uses ids for the tabs, having multiple summernote implementations generates duplicate ids that conflict with each other.

DennisSuitters commented 4 years ago

I am aware, and am currently working on implementing features of the plugin directly into Summernote as per the request of the other developers.

MatthieuAWAM commented 4 years ago

Hi, as @davelassanske I needed to use the plugin with multiple implementations of Summernote on the same page. I resolved this behavior by adding a timestamp to each id of generated Bootstrap template, as you can see in the initialize function in my attached file : summernote-image-attributes.js.zip

Hoping this help ! Thanks to the team for the module 🙂

DennisSuitters commented 4 years ago

I did a PR a while ago, that has an options.id that can be used in Summernote, but it doesn't quite work as expected. The idea that each instance that is called would have it's own id to be used like you have @DazordM , my next approach when I get time will be to grab something like data-noteid from the element that the script is called on.

bazooka07 commented 4 years ago

Why not use a counter on $.summernote.options ? See my Pull-Request.

DennisSuitters commented 4 years ago

@bazooka07 Thanks for your contribution. I haven't been developing this plugin further, as I am working on integrating similar features directly into Summernote.