I’m looking for a way to open an URL in a new tab to show some docs related to a certain command. Is there a way to perform such action via plugin’s backend script without spawning a hidden UI with iframe and all?
Solved
Is there a way to open an URL via plugin command?
Best answer by Gleb
You can submit requests right on the forum in the #plugin-api:feedback category.
However, if you need the UI to just perform this action, it should be pretty easy, not much messing around:
const url = 'http://example.com'
const openLinkUIString = `<script>window.open('${url}','_blank');</script>`
figma.showUI(openLinkUIString, { visible: false })
setTimeout(figma.closePlugin, 1000)
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.