moving images with their containers

This one is hard for me, so I need your opinion (idea).

I have on an HTML page multiple images let’s say 20 and all images are in their containers (DIV). When the user needs to change their order, in TinyMCE editor, it’s not possible. If the user drags an image he will move it outside of its parent DIV. Is it possible to somehow move the parent DIV with the image too? I mean when the user selects an image and starts dragging it over TinyMCE editor that he actually drags and parent DIV too with that image.