-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Edge] No HTML is pasted/copied (only plain text available) #2660
Comments
Edge 15 will support Clipboard API... but there's a question how stable this support will be: https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6515107-clipboard-api |
@Mgsy could you check it? Edge 15 might've fixed the copy&paste issues. |
@Reinmar, copying and pasting styled content in the editor deletes its styling. Also, pasting i.e. bolded text from external website makes that some long HTML/CSS code appears in the editor. |
This is what we get on paste: Version:1.0
StartHTML:000000183
EndHTML:000004078
StartFragment:000003679
EndFragment:000004022
StartSelection:000003679
EndSelection:000004012
SourceURL:http://www.meteo.pl/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD> <!-- <meta http-equiv="X-UA-Compatible" content="IE=9"> //--> <TITLE>METEO.PL</TITLE> <LINK href="/css/style.20101021.css" rel="stylesheet" type="text/css">
<SCRIPT language="JavaScript">var WAMCOAMPS_YYYY=2017;var WAMCOAMPS_MM=6;var WAMCOAMPS_DD=22;var WAMCOAMPS_ST=0;var WAMCOAMPS_SYYYY="2017";var WAMCOAMPS_SMM="06";var WAMCOAMPS_SDD="22";var WAMCOAMPS_SST="00";</SCRIPT>
<SCRIPT language="JavaScript" src="advajax.js"></SCRIPT>
<SCRIPT language="JavaScript">
var lang="pl";
function otworz2() {
pre0004=window.open("./komentarze/index1.php","info","width=900,height=500,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,left=100,top=10")
}
function otworz3() {
pre0005=window.open("./komentarze/ogloszenie1.php","info","width=800,height=600,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,left=100,top=10")
}
function otworz4() {
pre0006=window.open("http://mapy.meteo.pl/faq/","info","width=1024,height=800,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,left=100,top=10")
}
//-------------------------------------------------------------------
// �ADOWANIE ZDALNE
//-------------------------------------------------------------------
//----------------------------------------------------------------------
//----------------------------------------------------------------------
var pierwszy=new Array(3);
pierwszy[0]='meteorogram_um';
pierwszy[1]='meteorogram_coamps';
pierwszy[2]='szczegolowe_wamcoamps';
var model_info=new Array(3);
model_info[0]='info_um';
model_info[1]='info_coamps';
model_info[2]='info_wamcoamps';
var act_model=-1;
function loadDIV(filename,name,force_load) {
if (document.getElementById(name).ajaxLoad==filename && force_load==0) {
} else {
advAJAX.get({
url: filename+".php",
onSuccess : function(obj) { document.getElementById(name).innerHTML = obj.responseText; document.getElementById(name).ajaxLoad=filename; },
onError : function(obj) { alert("Error: " + obj.status); }
});
var oScript = document.createElement("script");
oScript.src = filename+"_js.php";
oScript.id = filename+"_js.php";
document.body.appendChild(oScript);
}
}
function loadModel(name,force_load) {
if (name!=act_model) {
act_model=name;
b_model_name=pierwszy[name];
} else { b_model_name=document.getElementById('kon_3c_b').ajaxLoad; };
loadDIV(b_model_name,'kon_3c_b',force_load);
loadDIV(model_info[name],'kon_3c_b_model',force_load);
}
//------------------------------------------------------------------------
// OBS�UGA PRZE�ĄCZANIA MODELI
//------------------------------------------------------------------------
function loadKomentarz() {
advAJAX.get({
url: "./komentarze/komentarz_skrot.php",
onSuccess : function(obj) { document.getElementById('komentarz').innerHTML = obj.responseText; },
onError : function(obj) { alert("Error: " + obj.status); }
});
setTimeout("loadKomentarz()",600000);
}
function make_width() {
if (document.body.clientWidth<1024) document.getElementById('all').style.width = 1024;
else document.getElementById('all').style.width = "100%";
}
</SCRIPT>
</HEAD><BODY onload="make_width(); loadKomentarz();" onresize="make_width()"><DIV id="all" style="position: absolute; top:0px; left:0px; margin: 0px; padding: 0px; padding-top: 20px; width: 100%;"><DIV id="kon_3a"><DIV id="kon_3c"><DIV class="tab_big_model" id="kon_3c_b_model" style="visibility: visible"><!--StartFragment--><BR><BR><DIV style="font-size: 12pt; color: #000000; font-weight: normal;margin:20px;"><P><B>Prognozy ICM w nowej odsłonie!</B><P> Zapraszamy do serwisu map pogodowych <A href="http://mapy.meteo.pl/">mapy.meteo.pl</A>. Oprócz wyników naszych modeli (starych i nowych) udostępniamy 10-dniową prognozę globalnego modelu GFS. <P></P></DIV><!--EndFragment--></DIV></DIV></DIV></DIV></BODY></HTML>
clipboard.js (140,1)``` |
This is what ends up in the editor: It means that there's also a bug on our side that we stringify the source of As for how to workaround the messy HTML produced by Edge, we can use the |
It turns out that we need to wait a bit longer for https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11780845/ to be released. Without it, copy from the editor will only handle plain text (or HTML if we change the order of calls). |
@Mgsy could you check it on Edge preview (16.16xxx)? It's the latest version available on https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/. |
I checked it and unfortunately this issue still occurs on Edge 16.16257. |
BTW, I checked the other editors and it seems that none of them is trying to set any data to the clipboard. |
Quoting myself from https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11780845/:
Please tell me, this is not happening 😱 |
I mentioned that this is broken in Edge in the Browser Compat guides. And I'm moving this ticket to it13. But, frankly speaking, looking at the pace we should not expect a patch for this until Edge 17 (Edge 16 is still not released) so a year from now... I don't know. The good thing, though, is that in Edge 16 the first I also checked that https://github.com/ckeditor/ckeditor5-clipboard/issues/20#issuecomment-310370365 should not be a problem anymore. This is good news. |
@Mgsy could you check how these things work in the lastest Edge version? |
Quick summary for the current version (Edge 16.16299): What does work:
What doesn't work:
I've checked copy/paste in the developer's preview Edge 17 and it looks like all problems have been solved. Copy/paste works as expected. |
Thanks. So I think we can finally close this. |
I realize this was closed, however, oddly 12/21/2019 Edge is still not pasting html properly, but only for SOME subset of pages I have been testing vs same site and paragraph with embedded html links vs Chrome. Primarily example for the paste, that I require and tested is Evernote. Evernote allows two modes - one with html, RTF and native formatting, the other to match style of current font, but always "plain text". And yes, I was consistent with the proper html paste on all tests performed. Can anyone comment? Ideally, someone who is following the API question, or capable of confirming this or who would like to try a variety of sites. |
Edge still doesn't support Clipboard API: https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6515107-clipboard-api (https://developer.microsoft.com/en-us/microsoft-edge/platform/status/clipboardapi/?filter=f3f0000bf&search=clipboard).
Without a proper support for Clipboard API you can only paste or copy a plain text from the editor. To workaround this we'd need copybin and pastebin which require quite a lot of work to be implemented and they will be used only for Edge...
The text was updated successfully, but these errors were encountered: