mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
add {{FrontSide}} for copying question text
This commit is contained in:
parent
28b5a108f6
commit
0345ad7e2e
2 changed files with 2 additions and 1 deletions
|
@ -490,6 +490,7 @@ where c.nid = n.id and c.id in %s group by nid""" % ids2str(cids)):
|
|||
else:
|
||||
format = format.replace("{{cloze:", "{{ca:%d:" % (
|
||||
data[4]+1))
|
||||
fields['FrontSide'] = d['q']
|
||||
fields = runFilter("mungeFields", fields, model, data, self)
|
||||
html = anki.template.render(format, fields)
|
||||
d[type] = runFilter(
|
||||
|
|
|
@ -19,7 +19,7 @@ def addBasicModel(col):
|
|||
mm.addField(m, fm)
|
||||
t = mm.newTemplate(_("Card 1"))
|
||||
t['qfmt'] = _("{{Front}}")
|
||||
t['afmt'] = t['qfmt'] + "\n\n<hr id=answer>\n\n"+_("{{Back}}")
|
||||
t['afmt'] = "{{FrontSide}}\n\n<hr id=answer>\n\n"+_("{{Back}}")
|
||||
mm.addTemplate(m, t)
|
||||
mm.add(m)
|
||||
return m
|
||||
|
|
Loading…
Reference in a new issue