Reputation: 439
I'm currently creating a plugin on InDesign and I would like to know if it's possible to detect if the user deletes an object ? Because I would need to retrieve the id of the deleted object to remove it from an array.
I didn't find anything in the documentation about this I hope I didn't miss it.
if it's possible, i need to detect it on all elements of all pages.
I was thinking something like:
app.activeDocument.allPages.allItems.addEventListener("delete", function () {
var idOfDeleteElement = this.id;
})
And also if the user selects several objects to delete, how to do ?
Here is an image to illustrate what I am talking about :
Thank you in advance !
Upvotes: 0
Views: 82
Reputation: 439
The solution of @YuriKhristich is a good compromise :
Create a panel with a delete button and ask the user to use this button to delete items.
Upvotes: 0