Is it possible to embed image in markdown cell in gorilla-repl?
I would like to keep images in src
folder in the root of leiningen
project and be able to embed images into my worksheet with:
![plot 1](img/plot_1.png)
This does not look possible using the envisioned incantation.
The markdown implementation looks to be done in the browser in javascript, using codemirror, which for security reasons does not have the ability to load resources from the local file system when the origin is http://localhost.
It can, however, load resources over http, so using an http url for the resource in the markdown expression works.
One could conceivably teach gorilla to listen on a route that resolved to the src/ or resources/ directory on the local file system, but that would break if the worksheet were shared.
There would need to be a mechanism to turn the image data into a data:// url (with all the requisite limitations that entails) so it could be packaged with rendered worksheet html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With