Pre-fill fields in image dialog when image code is selected in editor

Authored by happy5214 on Dec 2 2014, 2:23 PM.

Description

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.

Bug: T40829
Change-Id: Ib117a2e6350400f9298d4892a00981ac41f3dbbf

Details