sanity-plugin-iframe-pane
Display any URL in a View Pane, along with helpful buttons to Copy the URL or open in a new tab.
Accepts either a string or an async function to resolve a URL based on the current document.
Installation
sanity install iframe-pane
This is designed to be used as a Component inside of a View.
import Iframe from 'sanity-plugin-iframe-pane'
S.view
.component(Iframe)
.options({
url: (doc) => resolveProductionUrl(doc),
url: `https://sanity.io`,
defaultSize: `mobile`,
refresh: {
button: true,
revision: true,
},
})
.title('Preview')
License
MIT © Simeon Griggs
See LICENSE