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