feat: Add utility function to get clipboard data

This commit is contained in:
Suraj Shetty 2021-04-23 11:42:03 +05:30
parent f2079f6e68
commit f2e6478daf

View file

@ -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');
}
});