Implement function copy text when click