Open the doc file, select all, and paste to the page

Doc with bug

Doc with no bug

Listen DOM paste event and get 'text/rtf' data from event.clipboardData.


window.addEventListener('paste', function (ev) {
  const data = ev.clipboardData.getData('text/rtf')
  console.log('RTF data:', data)
  document.getElementById('result').innerText = data || '<Empty Content>'
})
  

Result will display to the below area. (It will be <Empty Content> if no content)