mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
fix(web/setClipboard): support multi-line text (#302)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// yoinked from https://github.com/project-error/npwd/blob/d8dc5b7f47faf5fc581ffee30f31ff61d184cfe7/phone/src/os/phone/hooks/useClipboard.ts#L1
|
// yoinked from https://github.com/project-error/npwd/blob/d8dc5b7f47faf5fc581ffee30f31ff61d184cfe7/phone/src/os/phone/hooks/useClipboard.ts#L1
|
||||||
export const setClipboard = (value: string) => {
|
export const setClipboard = (value: string) => {
|
||||||
const clipElem = document.createElement('input');
|
const clipElem = document.createElement('textarea');
|
||||||
clipElem.value = value;
|
clipElem.value = value;
|
||||||
document.body.appendChild(clipElem);
|
document.body.appendChild(clipElem);
|
||||||
clipElem.select();
|
clipElem.select();
|
||||||
|
|||||||
Reference in New Issue
Block a user