MCPcopy Create free account
hub / github.com/experdot/pointer / copyToClipboard

Function copyToClipboard

src/renderer/src/services/exportService.ts:93–104  ·  view source on GitHub ↗
(content: string | Blob)

Source from the content-addressed store, hash-verified

91 * Copy content to clipboard
92 */
93export async function copyToClipboard(content: string | Blob): Promise<void> {
94 if (content instanceof Blob) {
95 // For images, use clipboard API
96 await navigator.clipboard.write([
97 new ClipboardItem({
98 [content.type]: content
99 })
100 ])
101 } else {
102 await navigator.clipboard.writeText(content)
103 }
104}

Callers 1

handleCopyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected