Closed dunkla closed 4 years ago
I use some applications/websites which understand formatted copy-paste-data. By adding "text/html" to clipboard, we could use a real formatted link when using html-format:
diff --git a/clipboard-helper.js b/clipboard-helper.js index 5f2027e..cb8ef8f 100644 --- a/clipboard-helper.js +++ b/clipboard-helper.js @@ -9,6 +9,7 @@ function FormatLink_copyTextToClipboard(text) { // Overwrite the clipboard content. event.preventDefault(); event.clipboardData.setData("text/plain", text); + event.clipboardData.setData("text/html", text); } document.addEventListener("copy", oncopy, true);
I use some applications/websites which understand formatted copy-paste-data. By adding "text/html" to clipboard, we could use a real formatted link when using html-format: