If a user copies a gif from a website into their clipboard and then tries to paste it into the Discourse composer, we would only paste a static single frame of the original gif. This happens because the browser doesn't store the original image in the clipboard, but two entries: 1. image/png with the frame of the copy moment 2. text/html with the markup of the gif img element This commit adds an heuristic that detects this and makes us pick the clipboard content of text/html instead of the image/png when this happens. From there our existing HTML paste logic handles and converts the HTML img tag into markdown, preserving even the alt text. See https://meta.discourse.org/t/-/218720 for context. |
||
|---|---|---|
| .. | ||
| app | ||
| config | ||
| lib | ||
| public/assets/scripts | ||
| tests | ||
| .ember-cli | ||
| .npmrc | ||
| ember-cli-build.js | ||
| package.json | ||
| testem.js | ||