【发布时间】:2015-11-15 12:36:04
【问题描述】:
如何将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 但演示它正在工作
-
ReferenceError: reference to undefined property o.scrollButtons.tabindex jquery.mCustomScrollbar.js:910:13 -
@brunoais 您使用的是哪个浏览器和操作系统?你试过在你的电脑上做一个演示吗?
-
Firefox 39.0.3 on win7;没有。
标签: jquery jquery-plugins sceditor mcustomscrollbar