permaculture playing cards*
The moose likes Ranch Office and the fly likes Copy / Paste code from posts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "Copy / Paste code from posts" Watch "Copy / Paste code from posts" New topic
Author

Copy / Paste code from posts

Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
When I copy code from a post whether it is in a code block or not, then paste it in my editor it is all in one long line.
Has anyone else experienced this?
Is this normal?
Or is there a fix?

Using Scintila Text Editor Version 1.51-wbd-1 on a Windows XP machine.
Thanks


doco
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
It's an HTML thing.
What I normally do is select "Reply with quote" on the post, then cut the code from the editor window.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
What I normally do is select "Reply with quote" on the post, then cut the code from the editor window.
Me too. Well, I really use the "edit post" key rather than "reply with quote", but same idea. Either way we don't actually submit the reply/changes, we just use the window to get a different view of the code, and grab a copy of that. One complication though is that when we do this, although line breaks and indentation have been preserved, all < and > have been replaced with &lt; and &gt;. It's necessary to go back and fix these. Fortunately your compiler will tell you about any you miss.


"I'm not back." - Bill Harding, Twister
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
I think that only sheriffs (and sometimes bartenders) can do the "edit" thing nowadays.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Guess you're right. Pity. Well, the warning about &lt; &gt; is still valid at least.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copy / Paste code from posts