@superside-oss/sanity-plugin-copy-paste
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@superside-oss/sanity-plugin-copy-paste

This is a Sanity Studio v3 plugin.

With this plugin, you can finally copy/paste referenced blocks in array type of fields in Sanity Studio.

Installation

npm i @superside-oss/sanity-plugin-copy-paste

or

yarn add @superside-oss/sanity-plugin-copy-paste

Usage

Add it as a plugin in sanity.config.ts (or .js):

import {defineConfig} from 'sanity'
import {copyPastePlugin} from '@superside-oss/sanity-plugin-copy-paste'

export default defineConfig({
  //...
  plugins: [copyPastePlugin()],
})

And then insert in any object you want as a field:

import {copyPaste} from '@superside-oss/sanity-plugin-copy-paste'

export default defineType({
  // ...
  fields: [
    defineField(copyPaste),
    // ...
  ],
})

License

MIT © Superside

Develop & test

This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.

See Testing a plugin in Sanity Studio on how to run this plugin with hot-reload in the studio.

Readme

Keywords

Package Sidebar

Install

npm i @superside-oss/sanity-plugin-copy-paste

Weekly Downloads

669

Version

1.0.3

License

MIT

Unpacked Size

106 kB

Total Files

23

Last publish

Collaborators

  • daniel.zagidullin
  • slawekkolodziej