Expected Behaviour of Observable JS in Quarto

I recently asked about Observable JS in Quarto (Setting up Observable in Quarto) but I think I had some fundamental misunderstandings about how it actually works, so I was hoping that someone may be able to elucidate how OJS should be used.

From what I've seen:

  • You write {ojs} chunks in which ojs code lives.
  • You click "render" and it renders a .html and a _files directory .
  • When you go to the localhost (e.g., http://localhost:ABCD/) all of the ojs renders and is usable
  • When you click on the .html file or view the document in RStudio none of the ojs is visible.

I've tried this on multiple computers (Windows 10 & 11) through both rendering in the terminal and through the GUI and this seems to consistently be what happens. The Quarto documentation doesn't seem to go into any detail about any of this.

So my questions are:

  • Is this expected behaviour, or should you be able to just click on the .HTML file and see all the OJS widgets?
  • If you can't just click on the .HTML file and see the document, how does one share an OJS document with someone else? Is it like Shiny where you need a server?



This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.