7
如何将mCustomScrollbar应用于SCEditor?jQuery插件:将mCustomScrollbar应用于SCEditor
This是我到目前为止已经试过:
HTML
<button id="btnScrollBar">Apply scrollbar</button>
<textarea id="editor"></textarea>
JS
$("#editor").sceditor({
plugins: "xhtml",
width: '100%',
style: "http://www.sceditor.com/minified/jquery.sceditor.default.min.css"
});
$("#btnScrollBar").click(function()
{
console.log("click");
$(".sceditor-container iframe").contents().find("body").mCustomScrollbar();
});
我也试过另一种方法,下面这个example,但导致身体被擦除(见this question)
iframe在jsfiddle中不起作用。尝试使用jsbin,例如 – brunoais
@brunoais,但它的演示工作 –
'ReferenceError:引用未定义的属性o.scrollButtons.tabindex jquery.mCustomScrollbar.js:910:13' < - 我想知道这个...有没有任何解释如何将其应用于与当前版本不同的文档? – brunoais