This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 < and >. It's necessary to go back and fix these. Fortunately your compiler will tell you about any you miss.