mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +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
|
||||
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