Standardize linebreak behavior

This commit is contained in:
somebody
2022-12-16 21:49:52 -06:00
parent df23399a4a
commit 4beb1a4b33

View File

@@ -6991,4 +6991,12 @@ function showGeneratedWIData(data) {
world_info_data[data.uid].manual_text = data.out;
send_world_info(data.uid);
}
}
}
$el(".gametext").addEventListener("keydown", function(event) {
if (event.key !== "Enter") return;
// execCommand is deprecated but until Firefox supports
// contentEditable="plaintext-only" we're just gonna have to roll with it
document.execCommand("insertLineBreak");
event.preventDefault();
});