在 Windows 上从 Eclipse 复制粘贴到 Gmail 时保留文本颜色?
当我从 eclipse/RAD 复制粘贴到 Outlook 时,所有文本颜色和代码格式都会保留,就像在 RAD 7.5 IDE 中一样。但是当我将相同的内容复制粘贴到 gmail 时,我就没有颜色了。这是浏览器的缺陷还是操作系统的缺陷?我不太了解 Windows 剪贴板的行为方式?非常感谢任何建议。谢谢 !
When I copy paste from eclipse/RAD to outlook all the text colors and code formatting is preserved just as in RAD 7.5 IDE. But when I copy paste the same to gmail, I am left with no colors. Is this a browser shortcoming or operating systems? I do not know a whole lot about how windows clip board behaves? Any suggestions are greatly appreciated. Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最简单的方法是:
这对我有用。
The easiest way is to :
It works for me.
这不是最干净的方法,但我发现如果我从 Visual Studio 复制代码,并将其粘贴到 MS Word 中,然后从 Word 复制到 Gmail (Chrome) 中,它会保持正确的格式。我猜原因是因为 Word 在粘贴时将格式更改为 HTML,而 Chrome 可以很好地处理。
It's not the cleanest way, but I find that if I copy my code from Visual Studio, and paste it into MS Word, then copy it from Word and into Gmail (Chrome) it stays formatted properly. I'm guessing the reason is because Word, upon pasting, is changing the format to HTML, which Chrome can handle just fine.
我正在尝试使用 Visual Studio 2010 和 IE9(均来自 MS)做同样的事情,它实际上效果很好。但是,它不适用于任何其他浏览器。我认为这是IDE和浏览器之间理解的问题。 IDE 将数据以特定格式放入剪贴板,浏览器负责理解它。但是,如果 Outlook 适合您,那么也许 IE8/9 也可以。只是一个想法。
I'm trying to do the same thing with Visual Studio 2010 and IE9 (both from MS) and it actually works great. However, it doesn't work with any other browser. I think it's a matter of understanding between the IDE and the browser. The IDE puts data in the clipboard with a specific formatting, and the browser is responsible for understanding it. However, if Outlook worked for you, then maybe IE8/9 works too. Just an idea.
也适用于 Libre Office 和 Linux
Also works in Libre Office and Linux