Override some CSS classes from django-admin in the markdown previews

We don't want to use django style headlines and margins in the preview,
we want something that looks a bit more like the main site. It's not
going to be exact (e.g. the colors will still be wrong), but it will
be a lot closer than without this.
This commit is contained in:
Magnus Hagander
2013-02-12 17:57:34 +01:00
parent 35b0d322bd
commit 6f96c14452
2 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,7 @@ function attach_showdown_preview(objid, admin) {
obj.style.marginRight = '10px';
obj.style.width = newdiv.style.width = "400px";
obj.style.height = newdiv.style.height = "200px";
newdiv.className = newdiv.className + ' adminmarkdownpreview';
}
obj.preview_div = newdiv;