Hello all!
I’m developing a custom app for a freshdesk client. It contains buttons whose role is to copy some link in the clipboard. However, as apps in freshdesk ticket view are displayed inside an iframe html tag, I got an error saying that I cannot use clipboard write inside an iframe that does not have
allow="clipboard-read; clipboard-write"
as parameters. The issue is I can only modify the custom app. I cannot add parameter to the external iframe, which is part of the freshdesk admin code I don’t have access to.
2. An example of the code about this functionality :
<button class="btn btn-success" onclick="navigator.clipboard.writeText('https://backoffice-qualif.onestock-retail.com/c340/fulfilment/order/${numeroCommande}-1')
.then(() => {
// Success!
})
.catch(err => {
console.log('Something went wrong', err);
alert(err);
});
">Ship from store (SFS)</button>
Screenshot of the error I get :
Thanks!