Hi,
I am trying to use the Clipboard API to read data from the clipboard and paste it inside my application (I tried edit box, string and list object)
I am calling this function:
Code
function readFromClipboard() {
navigator.clipboard.readText()
.then(text => {
// `text` contains the text from the clipboard
console.log("Clipboard contents:", text);
// You can now use the text as needed, e.g., display it in an HTML element
document.getElementById('output').textContent = text;
})
.catch(error => {
console.error("Unable to read from clipboard: ", error);
});
}
Display More
and although the browser is asking me if I will allow my app to see the clipboard (meaning that the function works) I cannot get the content of the clipboard inside my app.
Any help will be much appreciated.
I attach the mfa and you can see the result online here:
Please login to see this link.