在markdown中嵌入youtube视频?

编程入门 行业动态 更新时间:2024-10-14 06:19:43
本文介绍了在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视频?

本文发布于:2023-11-05 18:38:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1561564.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视频   markdown   youtube

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!