trix icon indicating copy to clipboard operation
trix copied to clipboard

Upload to Active Storage when paste images with CTRL + V

Open gabriel-fsa opened this issue 7 months ago • 1 comments

Hello, I use Trix to create a chat on my website and I am having the following problem.

Users are copying images (Github, discord) and placing them using CTRL + V, however, the URL of these sites remains expired and over time the image is lost, giving the user the false impression that the image was sent.

I would like to know if there is any functionality that already does this upload when ctrl + v is pressed or if there is an event that I could listen to to download and send to Active Storage to persist in my backend.

When dragging and dropping the image on my machine it works, but I would like to upload images pasted using CTRL + V.

Below is a GIF exemplifying the image pasted with the Discord URL:

pasting_on_trix

Here's a GIF of the functionality I'd like to have on Github: paste_github

gabriel-fsa avatar Jul 24 '24 21:07 gabriel-fsa