@mocanvas/mocanvas · function

useNativeClipboardEvents

declare function useNativeClipboardEvents(): TLUiClipboardEvents

The native copy, cut and paste listeners on the container.

Installed for their side effect; the returned functions are the same three as useMenuClipboardEvents so a component can use either without knowing which path it is on. The listeners ignore events that originated in a text input or a contenteditable — a copy inside a label being edited belongs to the label, not to the canvas.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.