我正在尝试让 SCEditor 在我的网络应用程序中工作。正如您在此处看到的,我已正确加载所有脚本。
我的文件夹看起来像这个 APP > main.py, templates, static > css, js, minified
<link rel="stylesheet" href="{{ url_for('static',filename='minified/themes/default.min.css') }}"/>
<link rel="stylesheet" href="{{ url_for('static',filename='minified/sceditor.min.js') }}"/>
<link rel="stylesheet" href="{{ url_for('static',filename='minified/formats/bbcode.js') }}"/>
<link rel="stylesheet" href="{{ url_for('static',filename='minified/formats/xhtml.js') }}"/>
但是当我调用时出现此错误:“未捕获的 ReferenceError:未定义 sceditor”:
<script type="text/javascript">
var textarea = document.getElementById('poruka_post');
sceditor.create(textarea, {
format: 'bbcode',
style: 'minified/themes/content/default.min.css',
});
</script>
不用说,无论是否使用 BBcode 格式,编辑器都无法正常工作