feat: Add utility function to get clipboard data
This commit is contained in:
parent
f2079f6e68
commit
f2e6478daf
1 changed files with 6 additions and 0 deletions
|
|
@ -1322,5 +1322,11 @@ Object.assign(frappe.utils, {
|
|||
frappe.msgprint(__('Please enable pop-ups'));
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
get_clipboard_data(clipboard_paste_event) {
|
||||
let e = clipboard_paste_event;
|
||||
let clipboard_data = e.clipboardData || window.clipboardData || e.originalEvent.clipboardData;
|
||||
return clipboard_data.getData('Text');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue