vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Is it possible to use different theme for Webview?

Open natereal opened this issue 3 years ago • 0 comments

Some Webview windows are unreadable when used in dark mode. The help pages seem to display nicely, but take the following for example:

url = "https://cran.r-project.org/web/packages/languageserver/readme/README.html"
html_object = rvest::read_html(url)
xml2::write_xml(html_object, file="temp.html")
rstudioapi::viewer(url = "temp.html")
image

Is it possible to configure VS Code not to use dark mode, similarly to the option for plots: image

In RStudio, these type of windows open with a white background:

# generate a temporary html file and display it
  dir <- tempfile()
  dir.create(dir)
  html_file <- file.path(dir, "index.html")
  url = "https://cran.r-project.org/web/packages/languageserver/readme/README.html"
  html_object = rvest::read_html(url)
  xml2::write_xml(html_object, file=html_file)
  rstudioapi::viewer(html_file)
image

natereal avatar Jun 30 '22 14:06 natereal