rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.71k stars 1.1k forks source link

RStudio Server cannot paste image in visual editor #12270

Open timtmok opened 2 years ago

timtmok commented 2 years ago

Split from #11783, which only addressed a regression in Electron. The server behaviour is not a regression and was only implemented for desktop.

System details

RStudio Edition : Server
RStudio Version : n/a
OS Version      : n/a
R Version       : n/a

Steps to reproduce the problem

  1. Take a screenshot that populates the clipboard
  2. Paste the screenshot while in visual editor

Describe the problem in detail

It will create a broken link with href="data:image/png;base64,iVBOR..."

Describe the behavior you expected

Image should be saved to the current project in an images folder. The image is referenced in the document.

jjallaire commented 1 year ago

This should now be working with the latest builds of panmirror from the quarto repo.

ronblum commented 1 year ago

@jjallaire and @timtmok is there a way to tell if the latest version of panmirror got pulled in to RStudio Server? I'm still seeing the issue in RStudio Server 2023.03.0-daily+312 on Ubuntu 20.04.5 via Chrome and Firefox on MacOS 13.2.

ronblum commented 1 year ago

@timtmok I think we're still pulling in the last version of Quarto instead of the latest update:

> RStudio.Version()$long_version
[1] "2023.03.0-daily+312"
> quarto::quarto_version()
[1] ‘1.2.280’
timtmok commented 1 year ago

I think it would be good to move to 1.3 pre-release or at least the 1.2.335 release. We'd probably want 1.3 for the arm64 support.

ronblum commented 1 year ago

I still see the issue in both RStudio Server and Desktop 2023.03.0-daily+318.

Image

jjallaire commented 1 year ago

This change will make sure that the paste fails more gracefully on server (no paste occurs rather than the data/image paste: https://github.com/quarto-dev/quarto/commit/3150a367fcf86373e4560565e8629a1b0d03f400)

We should keep this open as a feature request for supporting image pastes in server mode.

ronblum commented 1 year ago

Verified that nothing gets pasted in RStudio Server 2023.03.0-daily+347 on Ubuntu 20.04 via Chrome on MacOS 13.2. Moving to backlog-2 to keep the request open.