Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Code with IE 8 Format Problem

Status
Not open for further replies.

three57m

Programmer
Jun 13, 2006
202
US
Users of the new IE 8 may have noticed that copied code snippets from tek-tips lose their formatting when pasted. To fix this IE 8 has a compatibility button next to the refresh button, click the compatibility button and your copied code will now paste with formatting intact.

[thumbsup2]
 
Not a problem with Firefox [wink]

Cogito eggo sum – I think, therefore I am a waffle.
 
It isn't an IE8 format problem per se. IE8 gets it right (or, at least, gets the same HTML in both IE8 mode and in compatibility mode). The problem is the way the HTML is translated into unformatted ANSI text (which is what simple Edit controls, such as Notepad or the message editor here on tek-tips use) via the clipboard, where for some bizarre reason it drops the <br>.

If you paste instead into, say, Wordpad, the basic format of code snippets is fine. And if you paste into Word you get exactly what is in the code box.
 
Interesting strongm. I got into the habit of saving code examples in text files years ago and would not mind changing to wordpad so much. However, I do find that pasting code directly into vb6 for testing and losing the formatting to be a nuisance.
[neutral]
 
Oh, I'm not disagreeing that it is a nuisance. I do the same thing as you, direct pasting into the IDE so I've been running tek-tips on IE8 in compatibility mode more-or-less since I installed it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top