Textbox with automatic selection of text in order to copy to clipboard

Hello,

I need a small solution in order to select all text in a textbox when I click on it which I have predefined in the source. This text can have multiple lines and can be PHP, Jquery, HTML or whatever what kind of text.
The idea behind is that I can click on it and with Ctrl-C I can move the selection to my clipboard in order to put in my IDE (editor).
It should look something like this: http://jsfiddle.net/NNqyF/
That demo is not able to give multiple lines and any kind of code or text.
If anyone has got a solution it would be really appriciated.

Thanks in advance for any help!

grid

Hello,

The final solution is what I found here:

http://www.plus2net.com/javascript_t...ea-onclick.php

Have a nice day,

grid

Thanks for posting back, @gridishere, but I’m afraid that link is incomplete and giving a 404 error. :slight_smile: