Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
Tips on posting code to the forums?
posted

Can somebody please pass along some tips on using the forums? The standard editor double-spaces everything and mangles code that I try to copy-and-paste in. The plain text editor looked fine as I created the post above, but it displayed far differently than what I saw. Also, I'm having a hard time entering tags because of the auto-fill feature and the subsequent behavior when I try to delete characters I don't want. Any tips would be appreciated. I'll re-post my lst post if I can figure out how to get it looking decent. Thanks, Dave

  • 4960
    posted

    On the matter of double-spacing, one tip you can use to single space is to hold down the Shift key while pressing Enter.

    Everytime you press Enter, the editor creates a <p> tag for a new paragraph.
    Everytime you press Shift-Enter, the editor creates a <br> tag for a line-break.

    Code (esp. with syntax coloring) is arduous. If you don't care about the colors, you can paste it into plain old Notepad first and then re-copy/paste into the browser.  What I will usually do for a code block is jump into HTML view and place <code> tags or a <div> tags with style font-family Courier around my block so it appears in a monospace font.  Then there is usually plenty of pressing Backspace at the beginning of each line, pressing Shift-Enter, and indenting with spaces.