deck icon indicating copy to clipboard operation
deck copied to clipboard

Paste image on clipboard directly to comments like GitHub

Open Aesculapius opened this issue 7 years ago • 18 comments

The new attachment feature is awesome, it would be even more awesome if screenshots that are taken, can be pasted directly into the description field, like it is done on Github:

image

That would save the step to save into a file and upload that again...


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Aesculapius avatar Jul 13 '18 11:07 Aesculapius

@Aesculapius Yes, that would be a great enhancement. :+1:

juliusknorr avatar Jul 13 '18 12:07 juliusknorr

It is a very useful function! Would you please develop it? Thanks a lot!

helloxinxiang avatar Jun 03 '19 02:06 helloxinxiang

The only reason I still use Trello instead of deck is, that Trello can paste images from the clipboard directly into the card. It would be nice to get this feature maybe soon on deck.

Paolo-om avatar Dec 29 '19 19:12 Paolo-om

implemented in spreed: https://github.com/nextcloud/spreed/pull/3399

jakobroehrl avatar May 13 '20 10:05 jakobroehrl

Right now, pasting images creates a huge mess... If you accidently press Ctrl+V if you have an image in the clipboard, it pastes the whole binary content - which is rendered as unicode. It also hangs the browser for a couple of seconds which is really annoying. If possible, as long as pasting is not supported, I would opt for blocking pasting images into the description at all.

reox avatar Jun 03 '20 11:06 reox

Also related: It is already possible to show attached images in the description quite easily - simply use the markdown for the image ![desc](/apps/deck/cards/183/attachment/4) - the url can be directly copied from the uploaded image (or using the attachment icon directly).

So basically everything is already there: You just have to catch the Ctrl+V action with the upload and inserting the correct markdown.

reox avatar Jun 07 '20 10:06 reox

now, I can just paste the image and it is also shown correctly. But if I press Enter-key, everything disappears. The cell stays as blank cell.

image

xv1nx avatar Jun 09 '21 11:06 xv1nx

now, I can just paste the image and it is also shown correctly. But if I press Enter-key, everything disappears. The cell stays as blank cell.

it does not work for me with Deck 1.4.2 and NC 21.0.2 and Firefox 89. I think certain browser allow that but if the editor does not handle it properly it makes weird things...

reox avatar Jun 09 '21 17:06 reox

Just to note: #1561 might solve this as well. Nextcloud Text does support pasting images into the markdown editor. However, there they are saved as inline base64 images and not uploaded like it works right now for the attachments. (for me that would not make any difference, as long as the editor is still useable (see drawback below))

And base64 inline images are already supported by the current markdown editor/renderer: paste this in a deck description to get a red dot:

![red dot](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==)

(Source)

To go even further and as a potential workaround right now: there are browser extensions to paste as markdown. Some support to paste an image from the clipboard just as base64 encoded inline markdown. And this works great. The only drawback is, a single screenshot will create like a million lines in the editor window 😕

reox avatar Nov 23 '21 12:11 reox

I think most of the funtionality is allready there, just a few additional lines of code neccessary to connect the drop-event with the upload-code. But i'm not familiar with vue.js so i just posted a bounty on this. Maybe someone want's to engage also...

okow avatar Mar 02 '22 21:03 okow

I have read several issues around this topic and it seems this feature is waited by many people. But the current situation is not clear to me. Is there something planned? Does anyone from the development team care about?

I can participate to this issue, implement it if I'am allowed to.

Could someone for the dev team make a status? And if required and possible, explain me how to participate to sw dev?

brunodegoyrans avatar Aug 01 '22 08:08 brunodegoyrans

Hi @brunodegoyrans This is currently not scheduled for development on our side. However any contributions would be very welcome of course. I think the main question to clarify before diving into implementing this would be how the uploaded images are stored, but this could be basically an attachment to the card which is then just inserted into the markdown content.

For getting started with contributions I'd suggest to head to https://nextcloud.com/contribute/ first. You will need a local development setup of Nextcloud (e.g. https://docs.nextcloud.com/server/latest/developer_manual/getting_started/devenv.html or https://github.com/juliushaertl/nextcloud-docker-dev) where you can then clone the deck app from GitHub and start working on it. For deck itself you can find the relevant steps at https://github.com/nextcloud/deck/blob/master/README.md#developing to get it built from git.

Let me know if you haver any further questions.

juliusknorr avatar Aug 02 '22 10:08 juliusknorr

Hi @juliushaertl

However any contributions would be very welcome of course.

GREAT. We are going to work on it. Me or my collaborator Rija. We will make our best to fit the team quality requirements.

I think the main question to clarify before diving into implementing this would be how the uploaded images are stored, but this could be basically an attachment to the card which is then just inserted into the markdown content.

This is what I think of.

brunodegoyrans avatar Aug 02 '22 17:08 brunodegoyrans

Hi @juliushaertl

I have made a pull request https://github.com/nextcloud/deck/pull/3951 . The idea is to upload the image as if we have made it through the attachement list.

RijaRR avatar Aug 08 '22 11:08 RijaRR

+1 on this

viktorix avatar Jan 09 '24 18:01 viktorix

Please use the Github Reactions feature instead of commenting that also need a specific feature. That way we can see your support without notifying all users subscribed to a given issue.

juliusknorr avatar Jan 09 '24 19:01 juliusknorr

Any updates on this one? I saw the mentioned PR was finally withdrawn and wonder if the feature will be implemented in the future, which would be awesome.

nico-arnold avatar Jan 17 '24 10:01 nico-arnold