0

CKEditor5 newbie here - thanks for any help!

I initially downloaded and installed the pre-defined Classic Build (36.1) of CKEditor5 from the downloads page and created a test page that shown the editor working. But wanted more of the plug-ins for formatting, etc.

I've used the CKEditor5 online builder to create a custom build of most of the non-premium plugins and successfully downloaded the ZIP file and installed onto my web site for testing / learning.

The custom build ZIP comes with a different directory structure from the pre-defined classic build and new files in different places. It is unclear how to correctly install the files and which ckeditor.js file to use.

The ZIP includes the sub-directories:

  • build
    • translations
  • sample
  • src

Both build and src include the file ckeditor.js but neither work in my page

build\ckeditor.js gives the errors:

Uncaught SyntaxError: Invalid regular expression: /([a-zA-Z0-9脌-啪]+\S?)+/: Range out of order in character class (at ckeditor.js:5:1143610) Uncaught ReferenceError: Editor is not defined

NOTE: 'Editor' is the function I'm calling to activate CKEditor, previously with the Classic Editor package it was ClassicEditor but that generated the same error!

src/ckeditor.js gives the following errors:

Uncaught SyntaxError: Cannot use import statement outside a module (at ckeditor.js:5:1) Uncaught ReferenceError: Editor is not defined

NOTE: 'Editor' is the function I'm calling to activate CKEditor, previously with the Classic Editor package it was ClassicEditor but that generated the same error!

The main directory of the zip includes the file webpack.config.js - should this file be used???

The relevant sections of code in my page are:

The script include statement in the HEAD section (path is correct):

The TEXTAREA to be used for CKEditor5:

The JS code to activate CKEditor on this TEXTAREA:

<script>
    Editor
        .create( document.querySelector( '#answer' ) )
        .catch( error => {
            console.error( error );
        } );
</script>

Any help would be greatly appreciated.

0 Answers0