Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding youtube video in markdown?

i use the ruby gem formatize to parse my markdown-formated text. now i want to embed a youtube-video into the markdown text, but whenever i add the iframe snippet, the gem (or markdown?) just removes it from the output. any advise?

thanks!

like image 922
trnc Avatar asked Apr 22 '11 11:04

trnc


1 Answers

You'll have to get formatize to ignore <iframe> tags. See this link.

You can have markdown + HTML together so it sounds like it's an issue with the gem. Notice how the markdown syntax recommends that the older YouTube markup is embedded via direct HTML. You might be able to get away using the older <object> tag approach; I think it's still supported.

like image 114
Michael De Silva Avatar answered Sep 27 '22 19:09

Michael De Silva