mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
Prefer <br> over <div></div>
This commit is contained in:
parent
3ebc95d27c
commit
5c6694950d
1 changed files with 7 additions and 0 deletions
|
|
@ -55,6 +55,13 @@ function onKey(evt: KeyboardEvent) {
|
|||
return;
|
||||
}
|
||||
|
||||
// prefer <br> instead of <div></div>
|
||||
if (evt.which === 13) {
|
||||
evt.preventDefault();
|
||||
document.execCommand("insertLineBreak");
|
||||
return;
|
||||
}
|
||||
|
||||
// fix Ctrl+right/left handling in RTL fields
|
||||
if (currentField.dir === "rtl") {
|
||||
const selection = window.getSelection();
|
||||
|
|
|
|||
Loading…
Reference in a new issue