Pre-fill fields in image dialog when image code is selected in editor
This commit adds a function to parse image syntax selected in the
editor and uses the parsed data to automatically fill the fields
of the WikiEditor image dialog. Surrounding whitespace in the
selected wikitext is now included in the result. This causes an
issue with the ownline option in line 840, which appends an extra
line regardless of the post text.