LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > LinuxQuestions.org > LQ Suggestions & Feedback
User Name
Password
LQ Suggestions & Feedback Do you have a suggestion for this site or an idea that will make the site better? This forum is for you.
PLEASE READ THIS FORUM - Information and status updates will also be posted here.

Notices


Reply
  Search this Thread
Old 07-24-2013, 08:34 AM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Cool 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.
 
Old 07-24-2013, 05:19 PM   #2
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
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() {
   build('document.note.pad');
   selectAll('note.pad');
   //set the clipboard
   var Tex = document.getElementById("pad").value;
   window.clipboardData.setData("Text",Tex);
}
function select() {
   selectAll('note.pad');
}
BTW I think these are great suggestions.
 
Old 07-25-2013, 09:58 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
wow. that is awesome.

nice job!
 
Old 07-26-2013, 12:19 AM   #4
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Gnome-commander default button in copy/move dialog taylorkh Linux - Software 3 01-26-2010 08:04 AM
Glade GUI :: Cancel Button Code nomb Programming 1 03-15-2007 08:06 AM
Disable copy-paste on middle mouse button 311Sam Ubuntu 6 10-09-2006 08:40 PM
I need a python code that activate a button Linh Programming 0 08-20-2004 10:47 AM
Unable to copy paste by simultaneous clicking of mouse button jaiashutosh Linux - General 1 08-05-2003 08:02 AM

LinuxQuestions.org > Forums > LinuxQuestions.org > LQ Suggestions & Feedback

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration