MCPcopy Create free account
hub / github.com/clair-design/clair / copyFromText

Function copyFromText

docs/plugins/scripts/tiny-copy.js:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 * copy from textarea
43 */
44const copyFromText = string => {
45 const textArea = createTextArea()
46
47 textArea.innerHTML = string
48 textArea.focus()
49 textArea.select()
50 execCopy()
51 setTimeout(() => document.body.removeChild(textArea))
52}
53
54const tinyCopy = elem => {
55 if (typeof window === 'undefined') return

Callers 1

tinyCopyFunction · 0.85

Calls 2

createTextAreaFunction · 0.85
execCopyFunction · 0.85

Tested by

no test coverage detected