0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Add comment to HTML on copy

This lets us detect on paste if the copy (probably) came from Squire.
This commit is contained in:
Neil Jenkins 2024-07-18 13:05:11 +10:00
parent 3def29e081
commit e00a62e6fa

View file

@ -105,6 +105,7 @@ const extractRangeToClipboard = (
// Set clipboard data // Set clipboard data
if (!plainTextOnly && html && text !== html) { if (!plainTextOnly && html && text !== html) {
html = '<!-- squire -->' + html;
clipboardData.setData('text/html', html); clipboardData.setData('text/html', html);
} }
clipboardData.setData('text/plain', text); clipboardData.setData('text/plain', text);