Normalize line endings client side
This commit is contained in:
parent
a279e195be
commit
e027c71341
2 changed files with 2 additions and 4 deletions
|
|
@ -571,7 +571,8 @@ window.addEventListener("load", function() {
|
|||
});
|
||||
document.getElementById("sendbutton").addEventListener("click", function() {
|
||||
if (keyboardTextarea.value) {
|
||||
ws.send("t" + keyboardTextarea.value);
|
||||
// normalize line endings
|
||||
ws.send("t" + keyboardTextarea.value.replace(/\r\n?/g, "\n"));
|
||||
keyboardTextarea.value = "";
|
||||
keyboardTextarea.oninput();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue