开发者

Preserving text color while copy pasting on windows from eclipse to gmail?

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 !


The easiest way is to :

  1. copy your code from eclipse to MS word
  2. copy your code from MS word to gmail

It works for me.


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.


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.


Also works in Libre Office and Linux

  1. Copy text from Eclipse
  2. Past to Libre Office-writer
  3. Copy text from Libre Office-writer
  4. Paste to your document, such a blog post or gmail or anything else
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜