在markdown中嵌入youtube视频? [英] Embedding youtube video in markdown?

查看:481
本文介绍了在markdown中嵌入youtube视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ruby gem formatize 来解析我的缩减格式文本。现在我想将youtube-video嵌入到降价文本中,但每当添加iframe片段时,gem(或markdown?)都会将其从输出中删除。任何建议?



谢谢!

解决方案

您必须使用formatize忽略< iframe> 标签。请参阅此链接

您可以将markdown + HTML放在一起,这听起来像是宝石的问题。请注意,markdown语法如何通过直接HTML 嵌入旧版YouTube标记。您可能可以使用旧的< object> 标记方法;我认为它仍然受到支持。


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!

解决方案

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.

这篇关于在markdown中嵌入youtube视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆