-6

It's really annoying to insert 4 spaces manually for entering code into the text box.

I am wondering if there is a better method, as found normally in forums (like code tags).

1
  • I write in a text editor (Sublime Text), then copy to web browser. Oct 26, 2013 at 23:07

4 Answers 4

8

Select the lines you want as code; press ctrl+k; or click the code button

enter image description here

3

Select code, click {} button above the text area.

0

Type or copy paste in your code, highlight the block that you want to display as code, then just hit Ctrl + K and it will automatically indent it etc :)

-4

There is one more method and that is to put you code between two backticks.

5
  • Anybody who has negate the answer go through this link (stackoverflow.com/editing-help#code) on SO and give a bit attention to Code and Performated Text part.
    – Kalher
    Oct 26, 2013 at 23:32
  • 6
    That is for inline code spans, not for large code blocks. Oct 26, 2013 at 23:36
  • I believe the question is about code not about large code.
    – Kalher
    Oct 26, 2013 at 23:38
  • 3
    Generally a "block" of code means a large piece of code. Oct 26, 2013 at 23:39
  • 1
    Also, "It's really annoying to insert 4 spaces manually" surely refers to code blocks, not to inline code.
    – Arjan
    Oct 27, 2013 at 0:34

Not the answer you're looking for? Browse other questions tagged .