Custom App Clipboard

Hello all,

Is there a guide avaiable that outlines how you can enable Clipboard functionalities of an custom app within the Freshdesk iFrame for various browsers (Firefox, Chrome & Edge)?

Thanks

Hi @AB10, there isn’t an official guide for enabling programmatic clipboard in Freshdesk app iframes, because apps can’t turn it on themselves.

Why it’s blocked
Freshdesk loads custom apps in a sandboxed iframe. The host iframe does not set allow="clipboard-read; clipboard-write", so navigator.clipboard.writeText() fails in Chrome, Firefox, and Edge. That policy is controlled by Freshdesk - not something you can change from app code.

What works today

  1. Manual copy (recommended): show the value in a read-only field; the agent selects and copies with Ctrl+C / Cmd+C:
<fw-input id="copyField" readonly></fw-input>
<fw-button onclick="selectForCopy()">Select text</fw-button>
function selectForCopy() {
  document.getElementById('copyField').shadowRoot.querySelector('input').select();
}
  1. Open the link directly: if the goal is navigation, skip clipboard:
client.interface.trigger('open', { url: 'https://example.com/order/123' });
  1. Don’t rely on document.execCommand('copy'): it’s deprecated and blocked in the same iframe context.

Related threads: Copy to clipboard in custom app, iparams clipboard

If programmatic copy is important for your use case, share it on those threads - the platform team is aware of the limitation.