I was looking to create a Plugin to call a function on layer rename. So far I was only able to do it with the help of
on("selectionchange") and custom JS code to check if we changed the layer name.
I was wondering if Figma Plugin API has some deeper integration of event triggers like layerRename or layer order change etc. OR if somehow we can add event handlers to figma UI’s DOM change, and monitor layerOrder or layerName changes.
Second part of the problem is to detect the figma Artboard canvas changes, like is there a Plugin API to detect that I changed the text content of TextNode, or if I changed the width/height of RectangleNode etc.