The way I like to do it is this:
1) Select the photo you want to post in the gallery
2) Click the little icon to the right of the "Linked Thumbnail" box
3) Two new boxes will appear; "HTML Code" and "Direct Link"
4) Click inside the "HTML Code" box. The entire contents should highlight automatically
5) Press CTRL + C
6) Now go into your forum post and press CTRL + V
7) You should now see the HTML code for your image--not the image itself--in your post.
8) Continue to type comments or add images to your heart's desire.
I find it useful (even essential when I plan to add multiple images to a post) to first open the gallery and then open the forum thread in a separate tab or window before replying. This allows me to easily jump back and forth between the two, which makes copying and pasting much easier.
There are other ways to do it, but that's my preferred method.