1 person found this helpful
Why don't you on receiving an item from InDesign just check what the selection of InDesign is (app.selection) loop through the selections app.selection - app.selection[ app.selection.length -1 ] and get the info from InDesign?
Basically because I did not think about that option, thank you!.
But it would be great if the dragged object would contain the element type and id or something, makes much more sense to me.
2 people found this helpful
I think Trevor's approach is the cleverest I can think of but just for the completeness, you can actually have some info thanks to the dataTransfer payload of the drop event.
On mac, dropping an item onto the panel will generate a snippet into a temporary location. The url can be found using
Then you can edit that file. I use this to read at the BASE64 thumbnail of the snippet and display the representation of the selection inside the panel.
However things are slightly different on Windows as it doesn't return this info for whatever reason, so not only Trevor solution is smart but it will avoid dealing with os specific issues