CKEditor5 unknown field type ckeditorClassic

CKEditor5 unknown field type ckeditorClassic

SWATswatSWATswat Posts: 109Questions: 0Answers: 0

Hello,

I have installed the zip file CKEditor5 download here
I have installed the Plug-in code editor.ckeditor5.js download here
I have jquery version 3.7.1 and Datatable EDITOR v2.0.
When I replace type: “ckeditorClassic” with type: “textarea” datatables Editor works normally.
but if I replace it with the instruction given in the site example :

...
fields: [ {
    label: "commentaire :",
    name: "controles.commentaire",
    type: "ckeditorClassic"
},
...

I get the following error messages in the console:
Uncaught TypeError: DataTable is undefined for the file editor.ckeditor5.js
Uncaught SyntaxError: export declarations may only appear at top level of a module
Uncaught Error: Error adding field - unknown field type ckeditorClassic for the file dataTables.editor.min.js

all files are called in the page:

would you have an idea, or could I have made a mistake, please?

Thinks

Replies

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    Looks like editor.ckeditor5.js is being loaded before DataTables. Change the load sequence so you load at least DataTables first. Probably it would be a good idea to load Editor first as well, but the plugins are designed so that they can be loaded before Editor.

    Allan

  • SWATswatSWATswat Posts: 109Questions: 0Answers: 0

    Hello Allan,

    I changed the order but the problem persists.
    At any risk, I use ckeditor5 v42.0.1

    An other idea please ?

    Thanks.

  • SWATswatSWATswat Posts: 109Questions: 0Answers: 0

    I've changed the order of the files called many times and it doesn't work.
    I replaced ckeditor5 with tinymce and it works fine.
    Very strange...

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    On the console, if you do:

    window.ClassicEditor
    

    does that give you a class object?

    And what does:

    Object.keys(DataTable.Editor.fieldTypes)
    

    give?

    Thanks,
    Allan

  • SWATswatSWATswat Posts: 109Questions: 0Answers: 0

    Hello Allan,

    You just had to register for it to work. :#

    Thanks a lot.

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    Ah! They used to just show a "Not licensed" footer, but they much have changed it again. Its fair enough, they've tried a bunch of different models for making money from their software (I need to think of some more myself!), and I hadn't realized they'd made that change.

    Thanks for letting me know.

    Allan

  • SWATswatSWATswat Posts: 109Questions: 0Answers: 0

    For Tinymce you have to register too, but it's still free. You also have to register your domain name, otherwise it won't work.

Sign In or Register to comment.