3 ms·
The clipboard contains multiple formats. So if you paste a couple of excel cells in another sheet you get what you expect. But if you paste it into notepad you
by tjoff 7y ago
The clipboard contains multiple formats. So if you paste a couple of excel cells in another sheet you get what you expect. But if you paste it into notepad you get a text representation.
These do not need to contain the same thing, so the OS would need to preview all different formats and the user would have to manually inspect each of them.
- chmod775 7y ago> These do not need to contain the same thing, so the OS would need to preview all different formats and the user would have to manually inspect each of them. No. It just needs to preview the one that would be used by the destination. You could pretty much model this like existing drag & drop APIs, where whether a certain object is acceptable for "dropping" is communicated even before the user releases the mouse. In any case the OS doesn't need the application to tell it how to render the basic text representation.
- tjoff 7y agoYou don't know that until you paste, which might be a while after the copy and you also don't have the source available anymore in case it shows up weird, or you don't remember exactly what it was, or have it to compare to. This sounds quite cumbersome even for the techie. The basic text representation isn't enough. Maybe the text representation is correct but the html one embeds some javascript? How are you going to render that?