Replace text in an html element, but keep the original text for select and copy