@superside-oss/sanity-plugin-copy-paste
v1.0.3
Published
> This is a **Sanity Studio v3** plugin.
Downloads
6,440
Readme
@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.