How to embedd video in WYSI HTML5 editor

℡╲_俬逩灬. 提交于 2019-12-11 13:47:14

问题


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.


回答1:


Remove

line 4798 wysihtml5.js change it like this:

return elementOrHtml //turn off parser//  isString ? wysihtml5.quirks.getCorrectInnerHTML(element) : element;

Original line:

return isString ? wysihtml5.quirks.getCorrectInnerHTML(element) : element; 

will turn off the parser at all.

In

function parse(elementOrHtml, rules, context, cleanUp) {...



回答2:


I think this is what you're looking for. I think it only works in IE > 8 though.

https://github.com/xing/wysihtml5/pull/4



来源:https://stackoverflow.com/questions/11946681/how-to-embedd-video-in-wysi-html5-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!