Rendering HTML in cell output
The python kernel supports outputing HTML via the IPython.display module:
from IPython.core.display import display, HTML
display(HTML('<h1>Hello, world!</h1>'))
In Julia, one can do the same thing via (from this post):
display("text/html", "<script>alert('hello')</script>")
I see iracket already supported rendering images, but I'm not sure how it is implemented. Maybe expose some API for HTML rendering? My use case is to generate some file links for downloading.
Here are some snippets that may be related:
https://github.com/rmculpepper/iracket/blob/d2ffb50c63a20df68a52359214697657eb9fb850/private/jupyter.rkt#L106-L124
https://github.com/rmculpepper/iracket/blob/d2ffb50c63a20df68a52359214697657eb9fb850/private/kernel.rkt#L133-L135
https://github.com/rmculpepper/iracket/blob/d2ffb50c63a20df68a52359214697657eb9fb850/private/kernel.rkt#L154-L174