Allow customizing styles via a custom class
Previewer-specific styles can now be specified in card templates by targeting the "editor-preview" class. E.g: ``` .editor-preview { font-size: 12px; } ``` Closes #1
This commit is contained in:
parent
b41ac7ae1d
commit
30394c02d5
@ -79,6 +79,7 @@ class EditorPreview(object):
|
||||
bodyclass = theme_manager.body_classes_for_card_ord(c.ord, mw.pm.night_mode())
|
||||
else:
|
||||
bodyclass = theme_manager.body_classes_for_card_ord(c.ord)
|
||||
bodyclass += " editor-preview"
|
||||
|
||||
return f"_showAnswer({json.dumps(a)},'{bodyclass}');"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user