Hello! I’m currently working on a plugin and I’m trying to pass the Font Size value to display within my Plugin UI. I’m retrieving the value via
const selection = figma.currentPage.selectione"0"].fontSize;
but I can’t seem to get it to display within my plugin UI. I’ve tried
document.getElementById('font_field').innerText = (figma.currentPage.selection."0"].fontSize);
but no luck.
My main goal is to actually just pass the value to a tensor flow script that’s working within my html doc but to also display it within the UI.
How do I communicate between the two files? : )
Thank you!!
Page 1 / 1
You must send the message using postMessage.
figma.com
Worked like a charm, thank you!
I’m using postMessage
figma.ui.postMessage({ type: 'results', updatedComponents}, '*');
but I get the following error:
Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
Scanning file for viruses.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
This file cannot be downloaded
Sorry, our virus scanner detected that this file isn't safe to download.