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.
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.