Skip to content
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 With Syntax Highlighting not work with Keynote/Pages #21686

Closed
othree opened this issue Mar 2, 2017 · 6 comments
Closed

Copy With Syntax Highlighting not work with Keynote/Pages #21686

othree opened this issue Mar 2, 2017 · 6 comments

Comments

@othree
Copy link

@othree othree commented Mar 2, 2017

  • VSCode Version: 1.10.1
  • OS Version: macOS 10.12.3

Steps to Reproduce:

  1. Use command+shit+p and execute copy with syntax highlighting
  2. Paste to Keynote

Expect Result: Paste code block with style to Keynote

Actual Result: Paste plain text to Keynote

If I paste to MS Word first, copy from Word. Then paste to Keynote.
Then the style of code is correct.

@mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Mar 2, 2017

I confirmed this

Pages and keynote may not support pasting html content http://apple.stackexchange.com/questions/124152/how-do-you-paste-syntax-highlighted-code-into-keynote-13 . I suspect that copying code from Word works because Word copies RTF text to the clipboard in addition to html content. It seems to me that this RTF text is what Pages and Keynote are looking for

@rebornix rebornix mentioned this issue Mar 6, 2017
1 of 1 task complete
@rebornix
Copy link
Member

@rebornix rebornix commented Mar 13, 2017

For short, we can't do this with current design at this moment.

The long reason is that all our copy and paste stuff (and type, screen reader, etc) relies on HTML Dom. We listen to Copy/Paste events on textarea and we access the clipboard through the events. It's the browser (Chromium in our case) who handles all the clipboard work for us. If Chromium doesn't set HTML content in the system clipboard reasonably, then we can't.

As @mjbvz mentioned above, Word may set RTF text to system clipboard through some native API. If we want to do the same thing, we may need some nodejs power to access clipboard.

@rebornix rebornix added the editor label Mar 13, 2017
@rebornix rebornix added this to the Backlog milestone Mar 13, 2017
@alexdima alexdima removed the editor label Nov 24, 2017
@nitish24p
Copy link

@nitish24p nitish24p commented Feb 28, 2018

Anyone found a work around this? still seem to be facing this issue

@vscodebot
Copy link

@vscodebot vscodebot bot commented Sep 20, 2018

This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

@vscodebot vscodebot bot closed this Sep 20, 2018
@ch-hans-chen
Copy link

@ch-hans-chen ch-hans-chen commented Sep 28, 2018

Anyone found a work around this? still seem to be facing this issue
@nitish24p

You can try to copy code block as html format onto Apple's TextEdit.app then re-copy to keynote. The TextEdit.app will translate into RTF format for you. Hope this help. reference

@nitish24p
Copy link

@nitish24p nitish24p commented Sep 29, 2018

Yes i did that back then and it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.