added a new method to parts factory, so external parts can extend our generic ClientPart
Added closing by clicking outside to markdown dialog