I can select a layer/node inside a widget by expanding the widget layers in the sidebar, I can get the nodeId by typing figma.currentPage.selection[0].id
in console but I cannot find the same layer using figma.getNodeById()
.
I have a frame in my widget where a user can paste other nodes inside it and I want to save this data on WidgetNode using setSharedPluginData
. Can anyone explain how can I do it?