问题描述
我正在开发一个教程网站,我想在其中为用户显示文本和视频教程.为了输入信息和格式化,我使用了 bootstrap-wysihtml5-rails 编辑器.使用此编辑器,我可以添加链接、图像并执行所有基本功能.现在我想在编辑器中添加一个按钮来添加一个视频链接,这有助于我添加本地视频存储的视频路径.我搜索了许多链接,但无法获得我的问题所需的解决方案.顺便说一下 m 使用导轨 3.2.2.任何帮助都是可观的.提前致谢.
I am developing a tutorial website in which I want to display textual as well as video tutorial for users. To enter information and for formatting purpose I have used bootstrap-wysihtml5-rails editor. Using this editor I am able to add links, images and perform all basic functionality. Now I want to add a button in the editor to add a video link which help me to add video path of my local video storage. I searched through many links but could not get the solution as required for my problem. By the way m using rails 3.2.2. Any help is appreciable. Thanks in advance.
推荐答案
移除
第 4798 行 wysihtml5.js改成这样:
line 4798 wysihtml5.jschange it like this:
return elementOrHtml //turn off parser// isString ? wysihtml5.quirks.getCorrectInnerHTML(element) : element;
原文:
return isString ? wysihtml5.quirks.getCorrectInnerHTML(element) : element;
将完全关闭解析器.
在
function parse(elementOrHtml, rules, context, cleanUp) {...
这篇关于如何在 WYSI HTML5 编辑器中嵌入视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!