edit existing Synapse markdown widgets
refactor and add tests
from code review
Merge pull request #513 from jay-hodgson/markdown-edit-existing

SWC-784: edit existing widget markdown