Skip to content

AnnaRoss/sanity-copy-paste

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.0%
  • JavaScript 3.1%
  • Shell 0.9%