Is there a way to send multiple lines of text to the clipboard using javascript?
IE, I want to send:
abc
def
ghi
and not
abcdefghi
(and although right now i need to learn how to do it in Javascript, I would not mind hearing how it is done in other languages, like python)
Send it as one string with carriage return and line feed characters in it, as Russ suggested.
You replied to Russ that, "it does not work": what's the symptom of it not working?
If you're copying from the clipboard into HTML, note that whitespace (especially including carriage return and line feed characters) is not necessarily preserved by the HTML DOM when you insert it into the DOM.
did you try 'abc\r\ndef\r\nghi\r\n'
I haven't tested it, but check out some of the jQuery plugins.
http://plugins.jquery.com/taxonomy/term/657