Hi, my plugin is saving a list of node ids and their corresponding aspect ratios in my root node.
I want the plugin data in my root node to be updated whenever a node is deleted. Are there any events that are triggered whenever a node is deleted? If so, what event handler should I use to handle that?
All available events are listed above. I sent 3 links to the documentchange event so… that’s the one you should use. DocumentChange events have the following types (again, as shown in the links I sent):
Ok, I figured out that I have to handle the documentchange event using figma.on. Then, I need to extract out the array of documentchange objects from the event and check each object to see if they are of type “DELETE” like so: