grist-widget
grist-widget copied to clipboard
[renderhtml] The contents of <head><style></style></head> seems to be ignored by the renderer
Hello,
I'm trying to generate some HTML code so I can use the HTML widget in order to print it. However, it seems that CSS code is ignored if it is written in the
blockSee the following sample code :
<html>
<head>
<style>
#destinataire {
text-align: right;
text-transform: uppercase;
}
</style>
</head>
<body>
<p id='destinataire'>
This should be right-aligned and uppercase
</p>
<p style='text-align: right; text-transform: lowercase'>
This should be also right-aligned but lowercase
</p>
</body>
</html>
This is how it should be displayed (tested on the MDN Playground):
However, this is how the Grist HTML Viewer displays it:
Note that for some reason, the Markdown plugin not only renders HTML (I'd expect it to only parse Markdown text) but renders it correctly:
Thanks @hellpe. This reminds me of this possibly related issue https://github.com/gristlabs/grist-widget/pull/176 - @dsagal what do you think?