# 复制粘贴到支持彩色文本的地方时，语法高亮不会被复制

**URL:** <https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639>\
**Category:** Feature\
**Tags:** markdown\
**Created:** [2026年五月22日 16:06 UTC](https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639 "2026-05-22T16:06:29Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2026年五月22日 17:33 UTC](https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639/9 "2026-05-22T17:33:04Z")

</div>

当你复制到 ProtonMail 时，由于它是一个 Web 客户端，看起来似乎使用的是纯文本版本。请注意缺乏格式区分，不过由于你覆盖了字体，所以很难判断。

对比一下粘贴到 Thunderbird 的情况：

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/b/3/7b398cad620fd75b78979f70ff690b9a65c6e136.png)

它捕获了_部分_格式，但并非全部。

如果我复制，它会捕获_所有内容_：

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/c/1/9c144841b2d3859cc301056e7dfcf136d6105901.png)

我想要解决这个问题，你需要区分是：

- 并非所有样式都被复制
- 并非所有样式都被粘贴

从一个没有扩展程序的干净浏览器开始可能会有所帮助？例如，如果我使用一个没有扩展程序的隐私浏览器，我会得到：

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/4/1/a41f019ada61c1802ddc11cbd2bc8a73917c71b6.png)

我编写的这个 [脚本](https://github.com/Supermathie/utils/blob/main/watchClipHtml.py) 也能让你看到剪贴板的内容，或许会有帮助。

（或者也许是 Arch » Fedora 😛）

---

_[View the full topic](https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639)._
