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.

New tab

Format copied references

Add the callback to your Smart Citations configuration.

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 for the callback fields.