cderv
December 20, 2022, 11:36pm
2
I believe this is expected. OJS is JS based, and opening a HTML file only in a browser is not like looking at an online webpage. Some resources may not load, or feature not work.
This is why you need quarto preview
so that a local web server is started for you too look at your document.
Some discussion in
opened 12:43AM - 20 Sep 22 UTC
closed 03:07PM - 21 Sep 22 UTC
invalid
Hi, sorry if I misunderstood this.
When I use OJS to make slides interactive… , it is only interactive while running on the local server.
However, if I open the generated `html` file directly in the browser, the interactive bars do not show up.
Maybe I'm missing something, or this is the expected behaviour. If the former, I apologize.
If the latter, I'd suggest a modification to the following part of the [documentation](https://quarto.org/docs/interactive/):
> One benefit of using JavaScript for interactive documents is that all the logic and computation is performed on the client (so no server is required for deployment).
Reproducible Example:
````
---
title: "Reproducible Example "
format: revealjs
editor: visual
---
## Home
```{ojs}
viewof size_bar = {
let input = Inputs.range([50, 150],
{value: 70,
step: 1,
label: "Size Bar: "});
return input;
}
```
````