-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix: Properly copy selection as markdown to the plaintext clipboard #5212
Conversation
Using clipboardTextSerializer we can copy the current selection as markdown and don't need the extra keyboard shortcut, which was broken anyways as it always selected the full text Signed-off-by: Julius Härtl <jus@bitgrid.net>
e3c445a
to
ad26e8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have not tested it yet. Code changes look good. Nice to see more code getting removed than added. :)
I wonder what would happen with non-markdown files. I think the code in the editor factory might serve the purpose of extracting plaintext from the codeblock we currently wrap other files such as source code in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works like a charm.
/backport to stable28 |
While this works this creates a lot of UX issues, as even if you just copy parts of code it always adds the code tags. Could we maybe somehow instead put both into the clipboard? |
Using clipboardTextSerializer we can copy the current selection as markdown and don't need the extra keyboard shortcut, which was broken anyways as it always selected the full text
Steps to reproduce:
Fix #5213