clipboard paste javascript event code example Example: copy to clipboard javascript dom navigator.clipboard.writeText('Text');