Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rmd Qmd notebooks: inline preview HTML #282

Closed
vincentarelbundock opened this issue Jun 17, 2024 · 2 comments
Closed

Rmd Qmd notebooks: inline preview HTML #282

vincentarelbundock opened this issue Jun 17, 2024 · 2 comments

Comments

@vincentarelbundock
Copy link
Owner

No description provided.

@vincentarelbundock
Copy link
Owner Author

posit.R with is_posit_script() and is_posit_notebook(), returning FALSE whenever rstudioapi is unavailable.

Notebook inline:

    if (isTRUE(check_dependency("rstudioapi"))) {
      tinytable_print_rstudio <- getOption("tinytable_print_rstudio", default = "inline")
      assert_choice(tinytable_print_rstudio, c("inline", "viewer"))
      if (tinytable_print_rstudio == "inline") {
        tab = sprintf("\n```{=html}\n%s\n```\n`", tab)
        print(knitr::asis_output(tab))
        return(invisible(x))
      }
    }

@vincentarelbundock
Copy link
Owner Author

inline display does not appear to be available in Positron, and we need a hack to detect Rstudio, but this seems to work. rstudio/rstudioapi#310

c24a7f7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant