/clipboard-rtf-bug-demo

re-produce bug and show steps.

Primary LanguageHTMLThe UnlicenseUnlicense

ClipboardData.getData('text/rtf') bug

Introduction

Paste selection from Office Word to web page, and JS ClipboardEvent will be triggered. If the selection contains "Heading" styles, like "Heading 1", "Heading 2", etc, ClipboardEvent rtf data will be empty.

Reproduce

Step1

Create Word document and type line1 and line2.

Step1

Step2

Apply line2 with 'Heading 1' style.

Step2

Step3

Copy all docuemnt content.

Step3

Step4

Paste to the demo page.

Step4

Result

It print "Empty Content", but expect RTF text.

Result