QuartoNotebookRunner.jl
QuartoNotebookRunner.jl copied to clipboard
PlotlyJS not working for HTML output
Problem: test.qmd:
---
engine: julia
---
```{julia}
using PlotlyJS
plot(rand(10,4))
```
$ quarto render test.qmd --to html
load test.html
in browser ==> no plot, error in javascript console: require not defined
-
Solution A: change "require" to "cdn" here: https://github.com/PumasAI/QuartoNotebookRunner.jl/blob/main/src/worker.jl#L815
-
Solution B: Quarto has this mechanism: https://github.com/quarto-dev/quarto-cli/blob/feature/typst-css/src/core/jupyter/widgets.ts#L102-L105 but at the moment this is not triggered by the julia engine.