I'm sure everyone over 2.500 reputation has at least once had a question where the user simply didn't understand how to insert/highlight his code. Which often results in either none-formatted code which would be the least problematic option or in wrong-formatted code which means that they abused the block-quote function for that. The last part is where the it gets ugly.
For example I'm quite active on the Android tag where users tend to post their entire layout files content (XML) and those layout files can be very long sometimes. Editing such questions by hand line per line can drive you nuts.
My suggestion would be to have a simple window pop up when the user hits the code button. In that window you have only a textarea where you can paste your code and then you hit submit it posts the entire content formatted as code (i.e. properly indented) at the cursors position.
What do you think?