Anyways, the point of that was, coercing the data type down to the simplest format isn't always the right thing to do. Word should be able to paste formatted text into anything else that handles formatted text (you can paste word formatted text into TinyMCE, that's also pretty impressive)
The end result is that you end up with two common flows:
* The program I'm pasting into is another Office app and supports (roughly) the same formatting, or
* The program I'm pasting into is a very rudimentary text-handling program and will just look for the plain-text version of whatever was copied.
Yes, there are a number of apps that fall into the uncanny valley by trying and failing to parse Office's output, but I suspect for most people this is a huge red herring.
p.s. I'm a Microsoft employee, but I have nothing to do with how Office handles copy/paste. This is just my opinion.
"A number of apps" meaning "every textarea on the web with contenteditable set to true"?
And it isn't "trying and failing to parse Office's output" -- it's more like "taking Office's word for it that the garbage on the clipboard is actually HTML, when it isn't".
For example, if I copy some content with formatting from Word and paste it into Google Docs it will try to preserve the format. Is that expected behavior? I dont know, but that's how it's designed and I think that makes a lot of sense. If I have a table in Word why shouldn't I be able to copy that to Google Docs?
I dont know enough about the clipboard programming to know if the program that calls copy can determine what comes out based on the paste program.
Also, I think the garbage formatting lines in that article will never be shown to the user. That will only be shown if you try to look at the formatting directly or if you're reading the HTML.
1) You have a contenteditable region (or a rich text editor that otherwise can handle HTML).
2) User copies something from Word. One of the choices on the clipboard claims to be HTML. It isn't. It's pure garbage, understandable only to other Microsoft products.
The rich text editor has two choices: disable pasting HTML altogether (even from within itself, or from another application that actually does put real HTML on the clipboard) or deal with the garbage that comes in from someone pasting from Word.
The fundamental problem here is that Word puts garbage on the clipboard and lies about it, claiming that it's HTML.
No, but it's a huge surprise to users that copying and pasting from Word into a completely different program (say, a rich text editor in a web browser) brings all that crap along. Unless it's pasting into another Word window, it should paste the plain text. There is absolutely no situation where pasting Word's pseudo-HTML into a non-Microsoft program is the right thing to do. As you mention, Word's formatting is hideously complex, so why even bother? It isn't going to work. Just paste the text.