Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shahr's avatar
Level 10

Uncaught ReferenceError: ClassicEditor is not defined

I want to fix this error without using the package.

<script>
    ClassicEditor
        .create( document.querySelector( '#body' ), {
            cloudServices: {
                tokenUrl: 'https://your-token-url.com',
            }
        } )
        .then( editor => {
            console.log( editor );
        } )
        .catch( error => {
            console.error( error );
        } );
</script>
0 likes
3 replies
tykus's avatar

So, you don't want to use the CDN from the existing library:

<script src="https://cdn.ckeditor.com/ckeditor5/38.0.1/classic/ckeditor.js"></script>

Instead, you want to write your own implementation of ClassicEditor class???

shahr's avatar
Level 10

No, I am using CKEditor in my project. and when I open Create a Page, I get this error.

<script src="{{ asset('themes/ckeditor/ckeditor.js') }}"></script>

Uncaught ReferenceError: ClassicEditor is not defined

Please or to participate in this conversation.