windows 在从eclipse复制粘贴到gmail到gmail时保留文本颜色?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7127380/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Preserving text color while copy pasting on windows from eclipse to gmail?
提问by Kalyan
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 !
当我从 eclipse/RAD 复制粘贴到 Outlook 时,所有文本颜色和代码格式都像在 RAD 7.5 IDE 中一样保留。但是当我将相同的内容复制粘贴到 gmail 时,我没有任何颜色。这是浏览器的缺点还是操作系统的问题?我对 Windows 剪贴板的行为知之甚少?任何建议都非常感谢。谢谢 !
回答by Yassin
The easiest way is to :
最简单的方法是:
- copy your code from eclipse to MS word
- copy your code from MS word to gmail
- 将您的代码从 Eclipse 复制到 MS Word
- 将您的代码从 MS Word 复制到 Gmail
It works for me.
这个对我有用。
回答by Adam Rackis
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 复制我的代码,并将其粘贴到 MS Word 中,然后将其从 Word 复制到 Gmail (Chrome),它会保持格式正确。我猜原因是因为 Word 在粘贴时会将格式更改为 HTML,Chrome 可以很好地处理这种格式。
回答by alf
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.
我正在尝试使用 Visual Studio 2010 和 IE9(均来自 MS)做同样的事情,它实际上效果很好。但是,它不适用于任何其他浏览器。我认为这是IDE和浏览器之间的理解问题。IDE 将数据以特定格式放入剪贴板,浏览器负责理解它。但是,如果 Outlook 对您有用,那么也许 IE8/9 也适用。只是一个想法。