I think i did find a solution. It's a bit weird, but hey, it's for IE. It's a modified snippet I found on stackoverflow.
<body>
<a href="#" onclick='test("This\nIS\nA\nTEST")'>TEST</a>
<div id="cb" style="position: absolute; left: -2000px"></div>
</body>
<script>
function test(cText) {
cText= cText.replace(/\n\r?/g, "<br>");
// create an editable DIV and append the HTML content you want copied
var editableDiv = document.getElementById("cb");
with (editableDiv) {
contentEditable = true;
}
editableDiv.innerHTML= cText;
// select the editable content and copy it to the clipboard
var r = document.body.createTextRange();
r.moveToElementText(editableDiv);
r.select();
r.execCommand("Copy");
// deselect, so the browser doesn't leave the element visibly selected
r.moveToElementText(document.body);
r.select();
}
</script>
Dietrich Raisin
2010-10-16 18:59:14