Hopefully I’m posting on the right category – apologies if not.
I’m writing a new kernel and facing issues with displaying SVG:
- If I use
display_datamessage with a mime-type
image/svg+xml, it displays correctly, but when the notebook is exported to HTML the SVG content is displayed as text (the SVG code is displayed instead of the graphics).
- If instead I use
display_datamessage with mime-type
text/htmland simply send the SVG (since it’s valid within HTML), it also displays correctly in the notebook, and exporting the notebook to HTML works. But, if one saves and reloads the notebook, the SVG is gone (forcing me to re-run the affected cells).
Any suggestions or work arounds ?
Update: I tried loading the .ipynb with the SVG generate with method (2) above (embedded in an
display_data message) in Google’s colab, and there it displays the SVG when loading the notebook. This seems to indicate something specific to the jupyter-lab notebook’s loading ?