I have a contenteditable container with some images inserted. Also I have defined some internal values to these images with the jQuery.data() function.
Everything is working well untill I move these images inside the contenteditable. Then, all data associated with the images is gone.
Do you know how to avoid this? or if there is a better solution to assign information to DOM elements?
I have a contenteditable container with some images inserted. Also I have defined some
Share
I used to assign values to DOM elements within their
data-attributes.So instead of
data(), i’d use