Skip to content

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

Closed

Description

@othree
  • 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.

Activity

  1. mjbvz commented on Mar 2, 2017

    @mjbvz
    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

  2. rebornix commented on Mar 13, 2017

    @rebornix
    Contributor

    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 Matt Bierner (@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.

  3. added this to the Backlog milestone on Mar 13, 2017
  4. added
    under-discussion
    on Apr 19, 2017
  5. nitish24p commented on Feb 28, 2018

    @nitish24p

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

  6. added
    help wanted
    on Sep 12, 2018
  7. added
    *out-of-scope
    and removed
    under-discussion
    on Sep 20, 2018
  8. vscodebot commented on Sep 20, 2018

    @vscodebot

    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!

  9. ch-hans-chen commented on Sep 28, 2018

    @ch-hans-chen

    Anyone found a work around this? still seem to be facing this issue
    Nitish Phanse (@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

  10. nitish24p commented on Sep 29, 2018

    @nitish24p

    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

Metadata

Metadata

Labels

*out-of-scopeeditor-clipboardhelp wanted

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions