Unable to paste code with formatting here in the forum

I tried clicking on the toolbar to find the various options that I can use so that when I paste my code from Intellij it comes out formatted when I ask my question here but the formatting is dying. I am not able to find from toolbar how to format my code. Can someone help me so that I do not keep posting ugly formatted code.

See above partial screen shot of the web interface. That code is pasted from IntelliJ and wrapped as shown, but do note that IntelliJ has various whitespace options you (or I) could have change (tabs, spaces, etc for indents, etc.) that might not map to good formatting in the markdown.