mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-15 17:33:56 +00:00
fix(web/setClipboard): support multi-line text (#302)
This commit is contained in:
1 parent
62a0a2fe0b
commit
125f6e1a56
1 file changed
+1
-1
@@ -1,6 +1,6 @@
|
||||
// yoinked from https://github.com/project-error/npwd/blob/d8dc5b7f47faf5fc581ffee30f31ff61d184cfe7/phone/src/os/phone/hooks/useClipboard.ts#L1
|
||||
export const setClipboard = (value: string) => {
|
||||
const clipElem = document.createElement('input');
|
||||
const clipElem = document.createElement('textarea');
|
||||
clipElem.value = value;
|
||||
document.body.appendChild(clipElem);
|
||||
clipElem.select();
|
||||
|
||||
Reference in new issue
Block a user