How do I make copy/paste overwrite text work?