Ckeditor4: Support for Clipboard API in Edge

Created on 5 Jun 2017  Â·  12Comments  Â·  Source: ckeditor/ckeditor4

Are you reporting a feature or a bug?


Task

Check if the issue is already reported

http://dev.ckeditor.com/ticket/16994

Description

New Edge 15 ​implemented Clipboard API, so it will be nice to switch from our pastebin to real API in this browser.

Note however that users report some errors (see comments in the linked thread).

Other details

  • Browser: Edge 15+
  • OS: Windows 10
edge clipboard confirmed task

Most helpful comment

Checked on Edge preview 16.16257 using https://jsfiddle.net/6uwnad3f/1/ demo. Looks like it is fixed there already 🎉

All 12 comments

After some initial research, it seems that Edge really supports the Clipboard API – pasting works flawlessly.

There are however still some issues connected with cutting and copying from editor. If user cuts/copies using a button in the toolbar, then editor reports that cut was unsuccessful. Despite this notification, text is removed from editor and copied to the clipboard. Pasting however results in pasting as plain text (even if cut/copied text contained some rich content). It seems like an issue with editor itself (as our current clipboard integration has lot of logic dedicated to Edge/IE) as "pure" [contenteditable] works as intended.

I have commented in MS Dev Feedback the following:

@PiotrekKoszulinski looks that Edge will not stack multiple mime types added with setData.

I have prepared a small demo, where you can play around with it: https://codepen.io/mlewand/pen/MoEMzX

Currently if you change the order of setData() in paste listener, it will put either text/html or plain text into the clipboard but not both.

So it breaks copying experience.

Actually it has been tracked here: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11780845/

Seems that the issue has been fixed, so we need to wait for the new Edge release to verify if the issue got fixed.

I checked preview version of Edge 16.16215 and it's not yet fixed there. So we still need to wait a bit.

Checked on Edge preview 16.16257 using https://jsfiddle.net/6uwnad3f/1/ demo. Looks like it is fixed there already 🎉

Great news!

@f1ames Some preparation were made on t/468 branch. Make sure to reuse it if possible for further investigation.

Edge (tested in 16 preview) still does not support custom mime types for dataTransfer.setData (upstream issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8007622/).

@f1ames FYI Microsoft is looking to publish Win10 Creators Update on October 17th. I guess that's when the new Edge version will go stable, we should keep an eye on that.

I can't confirm that setting two+ different mime types is correctly handled in Edge 16. From what I saw they only changed the order and now the first setData() call works. I was using this sample to test: https://jsfiddle.net/pmrkwt9r/1/.

@Reinmar, hmmm, that's weird. I checked your demo on Edge 16 (Microsoft Edge 41.16257.1000.0; Microsoft EdgeHTML 16.16257) and seems to be working fine:

oct-02-2017 11-13-42

One noticeable thing, is that during like 20 minutes of testing I encountered few cases where one of the mime types was not set correctly (empty) as you mentioned. However, it was not reproducible in a next try, looks like the API is not fully stable...

TBH, I'm not even surprised. When testing yesterday I had a couple of issues – also including some errors thrown on copy ;| Could you post your comment to the issue on MS's issue tracker – this may help them debugging.

Was this page helpful?
0 / 5 - 0 ratings