-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop: Resolves #7880: Paste as Text only working on hotkeys on Windows #7886
Desktop: Resolves #7880: Paste as Text only working on hotkeys on Windows #7886
Conversation
In the "How to Test" section there should be more than testing the specific function. We should also check that nothing else got broken, for example what if the clipboard only contains HTML but not text data? In that case isn't it going to paste nothing? Also maybe check what happens when pasting from Word (or Wordpad if you don't have Word), LibreOffice or Thunderbird. There have been issues with these in the past so we should check there's no regression |
I'm not sure how to copy HTML content that is empty so I couldn't test that, but I tested with an empty clipboard, and with Google Docs, since when copying from Wordpad it doesn't bring any styles, and with Gmail content. |
Just so you know when this PR or #7885 get merged it will (probably) create a merge conflict. |
Indeed it does. Could you look at it please, and then we can merge |
Resolved. |
@pedr, could you confirm if something needed to be merged in this PR? Because the |
Yes, my mistake. Since we changed from my implementation to the |
Resolves #7880
When making the implementation for the Paste as Text functionality I use the
clipboard.read
function which is still experimental and doesn't seem to work on Windows.To fix that I just use the simpler function
readText
https://www.electronjs.org/docs/latest/api/clipboard
How to Test
If the command works with other shortcuts:
With Google Docs:
With empty content: