added markdown support, better media embed url support