7

mCustomScrollbarSCEditorに適用するにはどうすればよいですか?

これは私がこれまでに試したことです:

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();
});

この例に従って、別のアプローチも試しましたが、ボディが消去されています(この質問を参照してください)

4

1 に答える 1