I have a text input field I want to make easy for people to copy the contents. The input box contains a url which is longer than the length of the input field.
Currently I'm trying to make it pre-highlighted, and stays highlighted, so people just have to right click the text and copy it. How can I do this? And are there any other methods which are more preferred?
Are you referring to something link this that highlights the text onclick:
This will not automatically copy the text, just highlight all of it.
Yes, this is close to what I want. If you click on it it highlights it, but if you reclick it it will de-highlight it (which is default behavior). What I'm trying to do is make it so it's always highlighted.