The Developer Portal has several methods for adding code to replies and blog posts.

If you want to provide multiple files or a complete project, zip them up and attach the zip file.

For code snippets, use the following procedure:

  1. Click Use Advanced Editor

    2. Copy the code from your text editor or IDE.

    3. Remove extra white space (from copying).

    4. Select the full code snippet.

    5. Click the button with two greater then symbols ">>" tooltip "Insert"

    6. Select "Syntax Highlighting".  Then select the closest development language to what you posted.

    7. The system will show nicely formatted code in the editor.  You can edit the code there, but keep in mind it will not verify good syntax.

Hope this helps!