Sublime Text 2 Paste with Colors to MS Word

前端 未结 3 2019
野趣味
野趣味 2021-01-30 00:35

I would like to paste my code to a word document while preserving the highlighted, colored texts. Is there a way to do this?

3条回答
  •  醉梦人生
    2021-01-30 01:12

    The SublimeHighlight plugin does work well! But as Jorre noted, code can lose some colors. I found that the selection you are copying to the clipboard matters.

    When, for example, I select a portion of a CSS stylesheet, but the selection does not include the closing style tag, the colors will be lost. It appears that any incomplete element will be copied to the clipboard as white text.

    My solution has been to simply copy the entire code file to the clipboard as RTF, paste into Word, then make the selection there for further copy / pasting into a PowerPoint slide or elsewhere.

提交回复
热议问题