允许将GIF粘贴到作曲家

Continuing the discussion from Is it possible to paste images as their source address?:

If you right click and select “Copy Image” on a GIF you found on the internet with your browser, your clipboard will be populated with two elements:

  1. A static PNG image of the GIF as image/png
  2. An HTML img tag with the GIF source as text/html

For most use cases, it’s a far better user experience to pick the option 1 in the clipboard and upload that image right away in the composer, so that is what we always do. However, for animated GIFs we may want to invert the logic and paste the image source address, so the animation isn’t completely lost.

Example of the contents in the clipboard JS event after copying a random GIF from Google Image Search:

<img src=\"https://c.tenor.com/tX_T48A14BwAAAAd/khaby-really.gif\" alt=\"Khaby Really GIF - Khaby Really - Discover &amp;amp; Share GIFs\" jsaction=\"load:XAeZkd;\" jsname=\"HiaYvf\" class=\"n3VNCb\" data-noaft=\"1\" style=\"width: 389px; height: 389px; margin: 0px;\">

The BBPress composer have this feature, so we have to catch up!

10 个赞

It would be much better if that happened.

3 个赞

I have a PR up with a proposed solution:

5 个赞

Before:
image

After:

Can you give it a try @danielabc ?

5 个赞

Ainda bem que voce fala português kkk
me sinto um pouco perdida aqui, o que é PR? Paraná? KKK

esse link que você me passou é um plugin? eu tenho que instalar ele?

obrigado

1 个赞

No plugin, you just need to update to Latest. :slightly_smiling_face::+1:

1 个赞

Como nosso colega disse, é só atualizar o seu Discourse.

2 个赞

ai serio que modificaram o Discourse so por causa de mim? que chique kkk

o que quer dizer PR? quer dizer uma dica para eles arrumarem algo? eu posso dar dicas tbm?

Algo como uma “proposta de mudança”. Quando se envia uma mudança no código do software para que ele inclua uma nova funcionalidade ou arrume algum defeito.

No caso eu escrevi essa funcionalidade, e a apresentei como um PR que é avaliado por outros colegas da empresa e, por fim, incorporado ao software.

¡Great! :heart:

1 个赞

Eu testei aqui e VOCÊS ESTÃO DE PARABÉNS! Essa mudança melhorou MUITO a usabilidade do fórum, agora os membros podem até usar os gifs de outros membros que uparam pelo fórum mesmo! Ficou SENSACIONAL! (Antes não dava certo, ficava um imagem congelada kkk) Muito obrigado!

1 个赞