MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / copy

Function copy

packages/app-core/src/components/EditorPane.tsx:3601–3610  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3599 : []
3600
3601 const copy = async (): Promise<void> => {
3602 const sel = view.state.selection.main
3603 if (sel.empty) return
3604 const text = view.state.sliceDoc(sel.from, sel.to)
3605 try {
3606 await navigator.clipboard.writeText(text)
3607 } catch {
3608 /* clipboard may be blocked */
3609 }
3610 }
3611
3612 const cut = async (): Promise<void> => {
3613 const sel = view.state.selection.main

Callers 2

cutFunction · 0.70
cloneSettingsFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected