-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Copy RTF data to the clipboard #3535
Conversation
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.
Awesome! Thanks! I feel like there's a way to share code between GenHTML()
and GenRTF()
but I don't think that's worth blocking over. I created #3538 to track that.
@DHowett-MSFT Thoughts on bringing this into ConHost too? I feel like that'd be a separate PR but definitely relevant.
Yes, this will be cool for conhost. |
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.
This looks great to me. Thanks for doing this!
@anirudhrb it looks like the code formatting check is failing - could you run |
@DHowett-MSFT @carlos-zamora What needs to be done to bring this into conhost? Are you gonna create a new issue? |
Followup filed at #3560. No need to do it in this one. 😄 |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
🎉 Handy links: |
Summary of the Pull Request
RTF data is now copied to the clipboard. Tested by copy pasting text from terminal to WordPad.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Mostly similar to PR #1224. Added a new static method
GenRTF
inTextBuffer
that is responsiblefor generating the RTF representation of a given text. The generated RTF is added to the
DataPackage
that is ultimately passed to the clipboard.Validation Steps Performed
Validated by copy pasting text from the terminal to WordPad. Validated with different colors to make sure that is working. (MS Word seems to prefer HTML data from the clipboard instead of RTF.)