QuartoNotebookRunner.jl icon indicating copy to clipboard operation
QuartoNotebookRunner.jl copied to clipboard

PlotlyJS not working for HTML output

Open MHellmund opened this issue 9 months ago • 2 comments

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.

MHellmund avatar May 10 '24 20:05 MHellmund