From d5b320bd7d416b991a0776a9ae03dc12f6d7802b Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Tue, 14 Jul 2020 19:57:32 +1000 Subject: [PATCH] Fix plain text only copying when using toPlainText We need to get the HTML to convert. --- source/Clipboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Clipboard.js b/source/Clipboard.js index f9f918f..8a67f6b 100644 --- a/source/Clipboard.js +++ b/source/Clipboard.js @@ -18,7 +18,7 @@ var setClipboardData = cleanupBRs( node, root, true ); node.setAttribute( 'style', 'position:fixed;overflow:hidden;bottom:100%;right:100%;' ); - html = plainTextOnly ? '' : node.innerHTML; + html = node.innerHTML; if ( toPlainText ) { text = toPlainText( html ); } else {