New function to copy text into clipboard.