Separated out regex matching  for markdown from applying attributes
Added 'Help' and 'Preview' buttons. delegate must provide callbacks