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 !
-
When I copy pasted, operating system was windows XP and browser was Firefox 6.0. I tried copy pasting in CKEditor in IE browser I was able to paste after I was prompted to allow access to my clipboard with colors preserved. But CKEditor did not preserve colors on Firefox when I tried the same.Kalyan– Kalyan2011-08-19 21:18:45 +00:00Commented Aug 19, 2011 at 21:18
-
3Generally applications store multiple representations of data in the clipboard simultaneously; in this case there might be both HTML and plain text. It is up to the application in question to handle the formats appropriately, so the browser probably does not recognize the HTML format and falls back to the plain text.Luke– Luke2011-08-19 21:34:48 +00:00Commented Aug 19, 2011 at 21:34
4 Answers
The easiest way is to :
- copy your code from eclipse to MS word
- copy your code from MS word to gmail
It works for me.
2 Comments
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.
Comments
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.