php - bootstrap-wysihtml5 改变 iframe src
问题描述
我想在 wysihtml5 编辑器中使用 Youtube abd Vimeo iframe 代码。我用过
('#answer').wysihtml5();
和
$('#answer').wysihtml5({
toolbar: {
"font-styles": true, // Font styling, e.g. h1, h2, etc.
"emphasis": true, // Italics, bold, etc.
"lists": true, // (Un)ordered lists, e.g. Bullets, Numbers.
"html": true, // Button which allows you to edit the generated HTML.
"link": true, // Button to insert a link.
"image": true, // Button to insert an image.
"color": false, // Button to change color of font
"blockquote": true, // Blockquote
"size": "sm" // options are xs, sm, lg
}
});
遵循我正在使用的 iframe 代码
<iframe width="560" height="315" src="https://www.youtube.com/embed/zJZKWF7YBas" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
在数据库中,我看到它如下
<p><iframe width="560" height="315" src="<a href="https://www.youtube.com/embed/zJZKWF7YBas"">https://www.youtube.com/embed/zJZKWF7YBas"</a>; frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>?<br></p>
表示它已转换 iframe src
在屏幕上,我看到它如下所示。
<iframe width="560" height="315" src="https://www.youtube.com/embed/zJZKWF7YBas"; frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>?
所以我的问题是为什么 wysihtml5 正在改变 iframe src 以及如何阻止它?
解决方案
推荐阅读
- haskell - 为什么 Haskell 递归地导入实例?为什么不只从指定模块导入所有实例?
- python - 检查图表是否为二分图。为什么我的函数没有返回?
- python - 将颜色与 matplotlib 散点图中的数字相关联
- linux - 在 Windows 机器上运行 Linux Docker 容器是否有先决条件?
- codenameone - 如何改进 ConnectionRequest 的行为?
- c# - 分离实体 EF 不支持延迟加载
- django - Django 模型字段作为按钮组
- python - 如何通过 DRF 在 API 中发送外键数据类型
- python - Django DB query becomes 'None' as seen with DEBUG=True inside a long-running management command
- android - Android MVVM 2 ViewModels 与 LiveData 共享 1 个存储库