enter key

This commit is contained in:
Kyle
2019-04-18 20:12:57 -07:00
parent 3f7a20170a
commit ddb3440cb3
2 changed files with 10 additions and 1 deletions

View File

@@ -28,6 +28,15 @@ function scrollFunction() {
}
}
function textAreaKeyPressed() {
if (event.keyCode == 13) {
setTimeout(function() {
cursorIndex = document.getElementById("inputText").selectionStart
document.getElementById("inputText").value = document.getElementById("inputText").value.slice(0, cursorIndex) + "{line}" + document.getElementById("inputText").value.slice(cursorIndex, 0)
}, 5)
}
}