3 ms·
A native app will copy a selection into the clipboard in several ways, basically accounting for a selection of common MIME-types. So when you copy an image fro
by ljm 5y ago
A native app will copy a selection into the clipboard in several ways, basically accounting for a selection of common MIME-types.
So when you copy an image from Finder in MacOS, if you paste it into a terminal you get the file path and if you paste it into a comment on github you get the contents of the file as a binary blob.
When pasting, an application is essentially querying the clipboard for a representation of the data it can use, and if there is none, it either defaults to something or fails.
In a well designed program, all of the translating and parsing is done before sending to the clipboard. If you copy text from MS Word and paste it into a content editable field in a website, you might expect some consistency.
- iudqnolq 5y agoI believe at least on windows this bit isn't always true > In a well designed program, all of the translating and parsing is done before sending to the clipboard. To avoid unnecessary work a program can opt to delay rendering until it's pasted or the program is closed. This is why excel will sometimes ask you if you want to keep your clipboard on save.
- TazeTSchnitzel 5y agoBased on behaviour I've observed on Linux before, I think X11 might only use delayed rendering (at least for non-text stuff), and so pasting from a closed application just hangs the recipient.
- dmitryminkovsky 5y ago> If you copy text from MS Word and paste it into a content editable field in a website, you might expect some consistency Hard-fought consistency... https://github.com/ProseMirror/prosemirror-schema-basic/blob/b5ae707ab1be98a1d8735dfdc7d1845bcd126f18/src/schema-basic.js#L135 https://github.com/ProseMirror/prosemirror-schema-basic/blob...
- tW4r 5y agoIs there any way to force which gets chosen? I love being able to copy and image and just paste it to WhatsApp/Messenger/Whichever other client, but if I do copy an image from the internet it’s very hit or miss if it shows up as an image when I paste, or a link. If I download the image, and then copy the downloaded one, it always shows up as an image
- TazeTSchnitzel 5y agoI ended up working around this by copying into GIMP and copying from there, but of course that's a suboptimal workaround. There's surely some small utility application for this.
- reportgunner 5y agoThe snipping tool.