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:
Abdo 2022-10-08 00:19:28 +03:00
parent b41ac7ae1d
commit 30394c02d5
1 changed files with 1 additions and 0 deletions

View File

@ -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}');"