mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Fix empty string on clipboard if plainTextOnly
If extractRangeToClipboard was called with a toPlainText fn and plainTextOnly=true, and there was a selection that was not just inside a single text node, it was not actually getting the text to add to the clipboard.
This commit is contained in:
parent
9f3e2610a6
commit
cc32c7dd7e
1 changed files with 2 additions and 4 deletions
|
@ -91,10 +91,8 @@ const extractRangeToClipboard = (
|
|||
}
|
||||
}
|
||||
|
||||
// Get Text version of data
|
||||
if (plainTextOnly) {
|
||||
// Do nothing; we were copying plain text to start
|
||||
} else if (toPlainText && html !== undefined) {
|
||||
// Get Text version of data if converting from HTML
|
||||
if (toPlainText && html !== undefined) {
|
||||
text = toPlainText(html);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue