Uncaught ReferenceError: sceditor is not defined

769 views Asked by At

I'm trying to get SCEditor to work in my web app. I have loaded all the scripts correctly as you can see here.
My folder looks like this 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') }}"/>

But I get this error: "Uncaught ReferenceError: sceditor is not defined" when I call:

<script type="text/javascript">
        var textarea = document.getElementById('poruka_post');

        sceditor.create(textarea, {
            format: 'bbcode',
            style: 'minified/themes/content/default.min.css',
        });

    </script>

Needless to say, the editor is not working with or without BBcode formatting

0

There are 0 answers