fix: avoid extra new line when copying
This commit is contained in:
1 parent
aed6d7782d
commit
55e8c442d1
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -14,7 +14,7 @@ const Pre = (props) => {
|
||||
}
|
||||
const onCopy = () => {
|
||||
setCopied(true)
|
||||
navigator.clipboard.writeText(textInput.current.innerText)
|
||||
navigator.clipboard.writeText(textInput.current.textContent)
|
||||
setTimeout(() => {
|
||||
setCopied(false)
|
||||
}, 2000)
|
||||
|
||||
Reference in new issue
Block a user