mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
add rtl fields to editor
This commit is contained in:
parent
b3fc9e8f8b
commit
72a01c0b90
1 changed files with 2 additions and 1 deletions
|
@ -168,6 +168,7 @@ function setFonts(fonts) {
|
||||||
for (var i=0; i<fonts.length; i++) {
|
for (var i=0; i<fonts.length; i++) {
|
||||||
$("#f"+i).css("font-family", fonts[i][0]);
|
$("#f"+i).css("font-family", fonts[i][0]);
|
||||||
$("#f"+i).css("font-size", fonts[i][1]);
|
$("#f"+i).css("font-size", fonts[i][1]);
|
||||||
|
$("#f"+i)[0].dir = fonts[i][2] ? "rtl" : "ltr";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,7 +426,7 @@ class Editor(object):
|
||||||
self.web.setFocus()
|
self.web.setFocus()
|
||||||
|
|
||||||
def fonts(self):
|
def fonts(self):
|
||||||
return [(f['font'], f['size'])
|
return [(f['font'], f['size'], f['rtl'])
|
||||||
for f in self.note.model()['flds']]
|
for f in self.note.model()['flds']]
|
||||||
|
|
||||||
def saveNow(self):
|
def saveNow(self):
|
||||||
|
|
Loading…
Reference in a new issue