JSFiddle - React, Tailwind, and code Playground
by alaferg
HTML
<html>
<body>
Alert A: <a onclick="test_copy()"><u>no newline</u></a>
<br>
Alert B: <a onclick="test_copy_b()"><u>newline</u></a>
<br>
Prompt: <a onclick="test_copy_c()"><u>newline</u></a>
<script>
function test_copy() {
window.alert("Can you copy: //path/to/file1 //path/to/file2");
}
function test_copy_b() {
window.alert("Can you copy:\n //path/to/file1 \n //path/to/file2");
}
function test_copy_c() {
window.prompt("Can you copy:", "//path/to/file1 \r\n //path/to/file2");
}
</script>
</body>
</html>