Support clipboardData.setData in iOS Safari
| Originator: | heath.borders | ||
| Number: | rdar://13605816 | Date Originated: | 08-Apr-2013 10:40 PM |
| Status: | Open | Resolved: | |
| Product: | iPad | Product Version: | 6.1 |
| Classification: | Enhancement | Reproducible: | Always |
Add support for clipboardData.setData in iOS Safari. Currently, the setData function exists on the clipboardData object, but does nothing.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Additional comments
08-Apr-2013 11:59 PM Heath Borders: Other major browsers support this functionality. This [1] is the only documentation for Safari I could find. Inside my onpaste callback, I tried event.clipboardData.setData("foo"), which threw an exception because I didn't have enough arguments. I also tried event.clipboardData.setData("text", "foo") and event.clipboardData.setData("text/plain", "foo") inside onpaste. Both of those did not change the results of event.clipboardData.getData("text/plain").
I'm implementing a rich text editor, and I'd like to ensure that pasted plain text is styled properly before it is inserted into my document.
[1] https://developer.apple.com/library/mac/#documentation/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/CopyAndPaste.html