• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Losing format copying from Code Tags

 
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.
 
Sheriff
Posts: 9099
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.
 
author
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
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.
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!