Shopify + Sanity: Read about the investment and partnership –>

Iframe Pane

By Simeon Griggs

Display any URL in a View Pane, along with helpful buttons to Copy the URL or open in a new tab.

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.

Iframe View Pane

Installation

sanity install iframe-pane

This is designed to be used as a Component inside of a View.

// ./src/deskStructure.js
import Iframe from 'sanity-plugin-iframe-pane'

// ...all other list items

S.view
  .component(Iframe)
  .options({
    // Required: Accepts an async function
    url: (doc) => resolveProductionUrl(doc),
    // OR a string
    url: `https://sanity.io`,
    // Optional: Set the default size
    defaultSize: `mobile`, // default `desktop`
    // Optional: Add a reload button, or reload on new document revisions
    reload: {
      button: true, // default `undefined`
      revision: true, // default `undefined`
    },
  })
  .title('Preview')

License

MIT © Simeon Griggs See LICENSE

Install command

sanity install iframe-pane

Contributor

Simeon Griggs

🇦🇺 in 🇬🇧 Solution Engineer @ Sanity

Simeon is located at Newcastle upon Tyne, UK
Visit Simeon Griggs's profile

Other plugins by author

Orderable Document List
- has 24 likes

Official(made by Sanity team)

Drag-and-drop Document Ordering without leaving the Editing surface

Simeon Griggs
Go to Orderable Document List

Hotspot Array
- has 6 likes

A configurable Custom Input for Arrays that will add and update items by clicking on an Image

Simeon Griggs
Go to Hotspot Array

Cross Dataset Duplicator
- has 5 likes

Empower content editors to migrate Documents and Assets between Sanity Projects and Datasets from inside the Studio

Simeon Griggs
Go to Cross Dataset Duplicator