The WebKit team recently released a significant update that delivers many improvements to the handling of content interactions with the clipboard. As an open source project, the TinyMCE team is proud to contribute to “the most basic interaction in modern operating systems,” WebKit’s management of copy/paste events.
Let’s take a look at some of the improvements.
- HTML sanitization (r223440) introduces a process that strips script elements, event handlers, and other potentially dangerous content from pasted content
- Introduction of blob urls (r223440), making pasted image data accessible to websites
- The ability for web applications to save images included in pasted content using the Blob API
There’s plenty more in the update from the Webkit team and we encourage you to check out the clipboard API improvement announcement.
To give some additional background, the HTML sanitization change came out of a request we made to improve access to image data on the clipboard. While evaluating our request, the WebKit team decided that not only was the data we asked for a privacy risk, so was the data we already had. The sanitization change, while it does give contentEditable editors better access to images than any other browser, completely removed our ability to control the Word import process.
Following this change, over a lengthy period in January and February, we worked with the WebKit team to analyze what additional data was needed to bring Word import back to the previous standard without compromising user privacy. By the time Safari 11.1 was released only two minor bugs remained, and both have since been resolved for inclusion in the next Safari release.
In conclusion to the announcement, the authors wrote:
We’d also like to give special thanks to the developers of TinyMCE who have tirelessly worked with us to resolve many bugs involving copy and paste from Microsoft Word to high profile websites which use TinyMCE.
Well, shucks, thank you!
The developer community should know that everyone at TinyMCE remains as committed to open source as the day we started. We remain committed to working with all browser vendors to improve their users’ experience. We remain committed to delivering great content creation experiences to everyone, whichever browser they choose.
Not only do we proudly spend time and resources working with all major browser vendors to fix bugs, and deliver improvements to ContentEditable’s behavior, we consider it core to our mission.
These commitments result in better browser support for TinyMCE and ultimately a better editor for everyone. This is one of many reasons why TinyMCE is the first choice of millions of developers around the world. Thanks again to everyone building WebKit.
Written collaboratively with TinyMCE engineer Andy Herron. WebKit & WebKit logo trademarks of Apple Inc.