[英]Visual Studio 2019 dark theme: How to copy and paste code to MS Word with default syntax highlighting?
I want to copy the code portion from Visual Studio 2019 Community, with Dark Theme set, and paste it to MS Word with preserving the copied text styles as it was done in Visual Studio 2017 - with the default code styling.我想从 Visual Studio 2019 社区复制代码部分,设置深色主题,然后将其粘贴到 MS Word,同时保留复制的文本样式,就像在 Visual Studio 2017 中所做的一样 - 使用默认代码样式。
Visual Studio 2017 with Dark Theme - copy result (that is what I want):带有深色主题的 Visual Studio 2017 - 复制结果(这就是我想要的):
Visual Studio 2019 with Dark Theme - copy result (unwanted):带有深色主题的 Visual Studio 2019 - 复制结果(不需要):
How to preserve that behaviour in VS 2019?如何在 VS 2019 中保留这种行为?
I tested Copy As Html extension but it didn't seem to solve the issue (or I am missing something).我测试了Copy As Html扩展,但它似乎没有解决问题(或者我遗漏了一些东西)。
a.一种。 Change BeforeCodeSnippet to:-
将 BeforeCodeSnippet 更改为:-
<style type='text/css'> .user{color:#006600 !important} .identifier{color: black !important;} .keyword{color: blue !important;} .literal{color: black !important;} .operator{color: black !important;} .string{color: #A31515 !important;} .number{color: black !important;} .Types{color: #2B91AF !important;} .Class{color: #2B91AF !important;} .delegate{color: #2B91AF !important;} .Interface{color: #79B351 !important;} .Interface.name{color: #79B351 !important;} .enum{color: #79B351 !important;} .enum.name{color: #79B351 !important;} .enum.member.name{color: black !important;} .comment{color: #008000 !important;} </style> <pre>
b.湾Change EmitSpanClass to true .
将 EmitSpanClass 更改为true 。
c. C。 Check if EmitSpanStyle is true.
检查 EmitSpanStyle 是否为真。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.