If I copy text from Word that contains bolded characters and paste it into a contenteditable DIV in IE the bolded characters are preserved. However, if instead I get the text from the clipboard via Javascript using the window.clipboardData.getData()
method then I receive the text in plain-text with \r\n
characters where the line breaks should be, but I don't see any indication of what text might be bold.
Is it possible that the 'bold' marker is using some sort of non-printing character in the text that I could detect and replace with a <b>
tag? If so what is that character?
I notice that if I go use Word online then it is able to preserve the bold text in pasted content from IE so it seems possible, but I have no idea how they're doing it.