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 · 4 comments

Comments

Projects
None yet
6 participants
@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

This comment has been minimized.

Show comment
Hide comment
@mjbvz

mjbvz Mar 2, 2017

Contributor

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

Contributor

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 referenced this issue Mar 6, 2017

Closed

Copy with formatting enhancement #22095

1 of 1 task complete
@rebornix

This comment has been minimized.

Show comment
Hide comment
@rebornix

rebornix Mar 13, 2017

Member

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.

Member

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

@alexandrudima alexandrudima removed the editor label Nov 24, 2017

@nitish24p

This comment has been minimized.

Show comment
Hide comment
@nitish24p

nitish24p Feb 28, 2018

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

nitish24p commented Feb 28, 2018

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

@vscodebot

This comment has been minimized.

Show comment
Hide comment
@vscodebot

vscodebot bot 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 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment