First time here? Check out the FAQ!
1

How to insert images into a numbered list with markdown?
 

If there is an image between numbered list items, then you get wrong numbers. Example:

  1. Number One

image description

  1. Number Two (but you see 1.)

image description

  1. Number Three (but you see 1.)

image description

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Toms's avatar
767
Toms
asked 12 years ago
Evgeny's avatar
13.2k
Evgeny
updated 12 years ago

Comments

Removed tag "bug" as the described behavior is by design of the markdown library.

Evgeny's avatar Evgeny (12 years ago)
see more comments

1 Answer

1

This is actually correct behavior.

  1. First item.

Unindented content breaks up the list.

  1. Second item.

To make this work, you need to indent your images to make them part of the list:

  1. First item.

    Indented content appears as part of the previous list item.

  2. Second item.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
todofixthis's avatar
1.3k
todofixthis
answered 12 years ago, updated 12 years ago
link

Comments

but if you want to make the counts your self, you can not! I can not write in the text: 4. This ist forth something, scince I get 1. This ist forth something . For me this is not correct

Toms's avatar Toms (12 years ago)
1

This is how markdown works. You can try using the wysiwig editor (tinymce). Neither one we can change significantly as they both depend on third-party libraries.

Evgeny's avatar Evgeny (12 years ago)

@todofixthis Could you make an example with images? thank you

Toms's avatar Toms (12 years ago)

Updated answer with lolcats (:

todofixthis's avatar todofixthis (12 years ago)

@todofixthis Thank you! I see it works, but it is too complicated for new users and it shifts the pictures to the right and makes them smaller, which is not so good for images with text.

Toms's avatar Toms (12 years ago)
see more comments