clipboard to text code example Example: copy to clipboard navigator.clipboard.writeText('Text To Copy');