Hi
- I created a Figma plugin (the orange rectangle creation as per Figma documentation)
- When I send message from HTML to typescript, it is working fine.
- I wrote a message handler in HTML. So that when I send a message from typescript to HTML, I can process it. Trust me, it was working fine. But not now.
Example is here…
in typescript,
Figma.ui.postMessage({ type: ‘totalSelected’, totalItemsSelected: selection.length });
in HTML,
window.onmessage = async (event) => {
const message = event.data.pluginMessage;
const type = message.type;
log(“Message:”, type, message);
console.log(“POST RECEIVED…”,message.type)
}
It was working… I am not sure, what happened 😦