Closed joshcullen closed 3 months ago
@joshcullen approach to be taken would likely be to use the {quarto-shinylive}
extension and create a code cell that has the editor and viewer components, e.g.
```{shinylive-r}
#| standalone: true
#| components: [editor, viewer]
# app code from your example
Alternatively, you can embed the [shinylive editor](https://shinylive.io/r/editor) website directly into a presentation, c.f.
````md
## shinylive REPL
```{=html}
<iframe allow="cross-origin-isolated" style="display:block; margin: 0 auto;" width="90%" height="75%" src="https://shinylive.io/r/editor">
</iframe>
Swap the `src` part of the `iframe` with the shinylive app share URL if needed.
Yes, I definitely think the right way to do this is using shinylive, as @coatless describes above.
The intention for this extension is really just to provide a simple scratch pad for impromptu scripting, rather than supporting complex applications such as Shiny apps. For that reason I'm going to close this issue in favor of pointing towards the quarto-shinylive extension.
EDIT: The quarto-shinylive GitHub readme doesn't make it clear, but it also works with R Shiny apps. Updating the docs to reflect this is on our radar.
This seems like a really great extension, especially for teaching purposes!
Not sure if it's possible to run a Shiny app with the way things are set up, but I received a
Error in utils::browseURL(appUrl) : 'browser' must be a non-empty character string
and wasn't able to resolve the error by specifyingshinyApp(ui, server, options = list(launch.browser = TRUE))
. Do you know if there's an argument that can be specified to resolve this? Below is the example code I used for the app: