Skip to content

Feature-request: copy-as-rtf, copy-selection-as-rtf #445

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
dhowe opened this issue Sep 24, 2017 · 13 comments · May be fixed by #3407
Open

Feature-request: copy-as-rtf, copy-selection-as-rtf #445

dhowe opened this issue Sep 24, 2017 · 13 comments · May be fixed by #3407

Comments

@dhowe
Copy link

dhowe commented Sep 24, 2017

Support copy sketch (or selection) to allow pasting into other documents with syntax highlighting, etc.

This is a really common task for teachers: code an example, paste it into a powerpoint or keynote doc...

@catarak
Copy link
Member

catarak commented Sep 26, 2017

great idea! i don't know how easy or hard this is to do, or if codemirror already supports this.

@dhowe
Copy link
Author

dhowe commented Sep 17, 2018

I wanted to second this request (even though it was mine to begin with)... ;)

this is absolutely crucial for those of us making presentation slides (keynote, powerpoint, etc) from sketches...

https://discuss.codemirror.net/t/include-textmarkers-in-copy-paste-operation/1054

@catarak
Copy link
Member

catarak commented Sep 17, 2018

i hear that! a workaround for now could be taking a screenshot of the code in a code editor, and then adding alt text to the image that is the code.

@dhowe
Copy link
Author

dhowe commented Aug 30, 2020

any movement on this? really important for teaching

@catarak
Copy link
Member

catarak commented Sep 2, 2020

There's hasn't been any movement on this and and I hear that it's important to you. I just added the help wanted label so that someone else might pick it up!

Someone was able to get RTF copy in CodeMirror working, see https://discuss.codemirror.net/t/rich-text-copy/695/4

Also, it's not ideal, but one workaround would be to download your sketch and then open it in a different text editor. I just tried this with VSCode and then copying the code to Keynote and it kept the formatting.

@ash97531
Copy link

I understood the issue, as I am new in open source contribution I would like to take this issue. Can it be assigned to me?
@catarak

@catarak
Copy link
Member

catarak commented Dec 16, 2021

@ash97531 feel free to work on this issue!

@ash97531
Copy link

ash97531 commented Dec 23, 2021

where can I ask doubts regarding codebase or if I stuck somewhere? It will be helpful for me to work on this feature.
And medium or platform to discuss?

@ash97531
Copy link

@catarak Can you please verify

@Indhiraraj
Copy link

@catarak Can i work on this issue?

@ash97531
Copy link

ash97531 commented Dec 2, 2024

Hi @Indhiraraj, I am not a mentor but I believe you can start working on the issue and submit the PR when completed.

If you’d like to check it out, I have already fixed the issue in this PR: #2962. However, it couldn’t be merged, possibly due to some version issues on their end.

Best of luck!

@Indhiraraj
Copy link

Hi @ash97531,

Thank you for letting me know! I’ll take a look at your PR (#2962) for reference and will start working on the issue.

@mr-loop-1
Copy link

mr-loop-1 commented Mar 4, 2025

I was viewing the changes made in PR 2962 and it looks like the rtf copy method there would work only with Ctrl+C, and not with selecting copy in right-click's context menu.
Another issue is that it is not able to paste that text in normal text editors without rtf features using this approach.

@catarak , please assign the issue to me. I would like to work on this.

@VenomHare VenomHare linked a pull request Mar 18, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants