将 vimeo 视频嵌入到tinyMCE编辑器中
我对编程一无所知,所以如果我弄错术语,请道歉。
我需要将 vimeo 中的视频嵌入到tinyMCE 编辑器中。这是 Vimeo 为其视频提供的嵌入代码:
<iframe src="http://player.vimeo.com/video/24676022" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
当我将其粘贴到编辑器并单击更新时,没有任何反应。它只是讨厌它并且不让我这样做还是有一个简单的解决方法?
I know nothing about programming so apologies if I get terminologies wrong.
I need to embed a video from vimeo into tinyMCE editor. This is the embed code that Vimeo provides for its videos:
<iframe src="http://player.vimeo.com/video/24676022" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
When I paste that into the editor and click update, nothing happens. Does it just hate it and won't let me do it or is there a simple workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您是否将该 HTML 代码粘贴到您的tinyMCE 编辑器的 HTML 版本中?
您不能简单地将 HTML 复制并粘贴到编辑器的所见即所得编辑器中。
除非您对要保存的 HTML 进行任何后处理,否则 iframe 也应该被保存(并在最终版本中显示)。
Are you pasting that HTML code into the HTML version of your tinyMCE editor?
You cannot simply copy and paste HTML into the editor's WYSIWYG editor.
Unless you are doing any post-processing of the HTML you are trying to save, the iframe should be saved (and shown in the final version) as well.
解决方案只需配置 TinyMCE 以接受 iframe 标记作为有效元素。
您可以在此处了解更多信息:http://www.frederikvig.com/2010/10/how-to-add-support-for-iframes-and-other-elements-to-tinymce-in-episerver-cms/
The solution is simply to configure TinyMCE to accept the iframe tag as a valid element.
You can learn more here: http://www.frederikvig.com/2010/10/how-to-add-support-for-iframes-and-other-elements-to-tinymce-in-episerver-cms/
您可以使用 htmlspecialchars_decode($data_from_mysql)
它将在您的网络浏览器中显示视频....
这对我来说非常适合..
you can use
htmlspecialchars_decode($data_from_mysql)
it will display the video in your web browser....
well this works perfect for me..
您可以使用以下 jquery 代码将 iframe 嵌入到您的 tinymce 创建的页面中:
You can use the following jquery code to embedd iframes into your tinymce created pages: