improve cloze and latex tag display in RTL environment

https://anki.tenderapp.com/discussions/ankidesktop/24292-mixed-arabic-and-english-words
This commit is contained in:
Damien Elmes 2017-07-28 16:39:32 +10:00
parent 7ad6966943
commit b8e306062b

View File

@ -209,6 +209,10 @@ function maybeDisableButtons() {
};
function wrap(front, back) {
if (currentField.dir == "rtl") {
front = "‫" + front + "‬";
back = "‫" + back + "‬";
}
var s = window.getSelection();
var r = s.getRangeAt(0);
var content = r.cloneContents();