You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/fields/blocks.mdx
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,42 @@ import {
133
133
} from'@payloadcms/richtext-lexical/client'
134
134
```
135
135
136
+
## Copying and Pasting Blocks
137
+
138
+
The Admin Panel includes built-in copy and paste support for both individual block rows and entire Blocks fields. This is available through the row action menu (the `...` button on each block) and from the field-level action menu in the field header.
139
+
140
+
### Row-level vs. Field-level
141
+
142
+
-**Row copy/paste** — copies a single block and lets you paste it into any position within any compatible Blocks field
143
+
-**Field copy/paste** — copies all blocks in the field at once and pastes them as the full contents of a target field, replacing whatever was there
144
+
145
+
### How it differs from Duplicate
146
+
147
+
The **Duplicate** action creates an immediate in-place copy of a block, inserted directly below the original — always within the same field on the same document.
148
+
149
+
**Copy/paste** is designed for moving data across fields or documents:
150
+
151
+
- Copy a block on `Page A`, open `Page B`, and paste it into that page's blocks field
152
+
- Copy a block from one Blocks field and paste it into a different Blocks field on the same document
153
+
154
+
### How it works
155
+
156
+
Copied data is written to `localStorage` under the key `_payloadClipboard`. This means:
157
+
158
+
- The clipboard persists across browser tabs (same origin)
159
+
- It is not shared between different Payload origins
160
+
161
+
When pasting, Payload validates that the copied block type exists in the target field's `blocks` config. If the schemas are incompatible, the paste action will not be available. All block and nested array IDs are automatically regenerated on paste to prevent duplicate key errors.
162
+
163
+
<Bannertype="warning">
164
+
**"Paste Fields" replaces all blocks, even when a single row is on the clipboard.**
165
+
166
+
If you have copied a single block row and then use **Paste Fields** (the field-level paste action in the field header), all existing blocks in the target field will be replaced with just that one copied row.
167
+
168
+
To add a copied row to a field that already has content, use **Paste Row** instead: add a new empty block first, then use the row-level **Paste Row** action on that new row to replace it with the copied data.
0 commit comments