Better generic dialog constructor.
Added Editor.restoreSelection method.
Added basic image insert / edit