I'd like to find a way to to click individual lines of a textarea and move them to a different location. I have the movement part down but can't find any info on if it's possible to only do single lines. Thanks for any input.
http://jsbin.com/vinuvopimo/edit?html,js,output
<html>
<body>
<textarea id="input"> Click me.</textarea>
<textarea id="output"> </textarea>
<script>
document.getElementById("input").onclick = function() {myFunction()};
function eraseText() {
document.getElementById("input").value = "";
}
function myFunction() {
var InputVar = document.getElementById("input").value;
var OutputVar = document.getElementById("output");
OutputVar.value = InputVar;
// cleanup
eraseText();
}
</script>
</body>
</html>