The simplest solution would be clicking the img
button on the editing form, or using the shortcut it shows (Ctrl+G):
This then prompts you with another mask which allow direct upload and linking and thus automatically inserts the necessary code:
If you do not want to use this mask, however, you can click the Images
button on the help bar, which shows the markup: