---
title: "Copy and paste citations"
description: "Control copied reference labels and handle pasted citation metadata."
canonical_url: "https://tiptap.dev/docs/citations/guides/copy-and-paste"
---

# Copy and paste citations

Control copied reference labels and handle pasted citation metadata.

Copied text and HTML include visible reference labels, such as `[Editor manual]`. Select a whole node to copy its citations. Use `formatCopiedReference` to change the label format or return `null` to omit it.

## Try clipboard formatting

Switch between **Square brackets** and **Parentheses** to see how copied labels change. Click **Paste back** to add the copied content as new citations in the editor.

> **Interactive demo:** [React](https://embed-pro.tiptap.dev/preview/Extensions/SmartCitationsCopy/React)

## Format copied references

Add the callback to your [Smart Citations configuration](https://tiptap.dev/docs/citations/getting-started/install.md).

```ts
SmartCitations.configure({
  sources,
  user: { id: 'author' },
  formatCopiedReference: ({ label }) => ` (${label})`,
})
```

- **HTML paste.** If the HTML retains citation metadata, the editor creates new citation IDs and keeps the confirmed references and attribution. It removes the clipboard labels and renders its own references. A partial paste can need review.
- **Plain-text paste.** Labels remain part of the pasted text.
- **Moves and imports.** Drag-and-drop moves and `setContent()` keep citation IDs.

See [`formatCopiedReference`](https://tiptap.dev/docs/citations/api-reference/extension.md#copied-reference-format) for the callback fields.
