我使用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视频?
发布评论