• Post Reply Bookmark Topic Watch Topic
  • New Topic

Losing format copying from Code Tags  RSS feed

 
ahmed yehia
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I lose code format identation and spacing when copying from "Code Tags" pasting to Textpad or even plain Notepad .. I got all code in 1 line. But when copying code from non tag it maintains code format.
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One work-around for that issue is to click on the quote marks as though you were going to reply. then copy the code from inside the code tags. The format will be maintained. Then just click on the back arrow to return to the thread.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a bookmarklet that I will post some time this evening that turns the text in the pre to a textarea.

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the bookmarklet I promised you

http://www.pascarello.com/examples/JavaRanchBookmarklets.html

If you never heard of a bookmarklet, it is JavaScript link that you save as a favorite. When you click on it in your favorites the JavaScript runs. What this does is it finds the code blocks and changed them to textareas so you can copy and paste the code.

Tested with IE6 on Win XP and FF2 on Linux

Eric
 
ahmed yehia
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried it, its very helpfull.. thanks.
and thanks alot Marilyn for the other way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!