Good morning,
I've been wanting to try out observable in Quarto. I'm a complete Observable/JS beginner, so I thought I'd start with something simple. My qmd file looks like this, which in theory should create an input range.
---
title: "OJS TEST"
format:
html:
toc: false
echo: false
keep-hidden: true
code-tools: true
---
```{ojs}
//| panel: input
viewof y = Inputs.range([0, 100], {label: "Amount", step: 1})
```
However, my document renders looking like this:
Am I missing something fundamental here? From the Quarto documentation it looks like it should just work - is there something else I need to download or set up?
Using Quarto version 1.2.269.
Cheers.
Hello @JackDavison ,
it works for me without problems on Quarto 1.2.137 .
I am not aware of doing anything special but I have a Java runtime(1.8) installed.
Do not know if that is necessary.
For system and R things see sessionInfo below.
Back-tick problems (in this forum) can be avoided by enclosing your code with (at least) one more backtick than you have in your code: I see three backticks in your code so enclose it with four backticks:
````
```
you see 4 backticks so you know I have used five to display these in this forum
```
````
sessionInfo()
#> R version 4.2.1 (2022-06-23 ucrt)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19045)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=English_United States.utf8
#> [2] LC_CTYPE=English_United States.utf8
#> [3] LC_MONETARY=English_United States.utf8
#> [4] LC_NUMERIC=C
#> [5] LC_TIME=English_United States.utf8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> loaded via a namespace (and not attached):
#> [1] rstudioapi_0.14 knitr_1.40 magrittr_2.0.3
#> [4] R.cache_0.16.0 rlang_1.0.6 fastmap_1.1.0
#> [7] fansi_1.0.3 stringr_1.4.1 styler_1.7.0
#> [10] highr_0.9 tools_4.2.1 xfun_0.34
#> [13] R.oo_1.25.0 utf8_1.2.2 cli_3.4.1
#> [16] withr_2.5.0 htmltools_0.5.3 yaml_2.3.6
#> [19] digest_0.6.30 tibble_3.1.8 lifecycle_1.0.3
#> [22] purrr_0.9000.0.9000 R.utils_2.12.0 vctrs_0.5.0
#> [25] fs_1.5.2 glue_1.6.2 evaluate_0.17
#> [28] rmarkdown_2.17 reprex_2.0.2 stringi_1.7.8
#> [31] compiler_4.2.1 pillar_1.8.1 R.methodsS3_1.8.2
#> [34] pkgconfig_2.0.3
Created on 2022-11-11 with reprex v2.0.2
As a development, it appears when I open the local host (i.e., http://localhost:XXXX/) I can see the OJS slider, but I cannot see it if I just open the rendered HTML or look in the RStudio viewer pane.
Is this expected behaviour?