Copy-code button
sorry if this is a repeat, searching for 'copy' and 'code' doesn't yield anything useful!
I think it would be great to have a javascript button next to any CODE section to quick select all that code and copy it to the local buffer, for easy pasting/testing. Additionally, there are quite a few great syntax highlighters out there these days for more relaxed reading. |
Just a suggestion why this may not be happening, interacting with the clipboard is by some a little bit of a security no no. With that said I have used JavaScript to do this exact thing, though I think it only worked in IE in Windows. It has been several years so maybe things have changed, but this is the JavaScript I used.
Code:
function ClipBoard() { |
wow. that is awesome.
nice job! |
Thanks for the feedback. We don't have any plans to incorporate javascript-based copy, but the PHP code tag does do some syntax highlighting.
http://www.linuxquestions.org/questi...?do=bbcode#php --jeremy |
All times are GMT -5. The time now is 02:23 PM. |