From e00a62e6fa8e1191f2015db6e5e98bae2e0266d2 Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Thu, 18 Jul 2024 13:05:11 +1000 Subject: [PATCH] Add comment to HTML on copy This lets us detect on paste if the copy (probably) came from Squire. --- source/Clipboard.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Clipboard.ts b/source/Clipboard.ts index f42d5de..847f519 100644 --- a/source/Clipboard.ts +++ b/source/Clipboard.ts @@ -105,6 +105,7 @@ const extractRangeToClipboard = ( // Set clipboard data if (!plainTextOnly && html && text !== html) { + html = '' + html; clipboardData.setData('text/html', html); } clipboardData.setData('text/plain', text);