CKEditor plugin installation - Resource name was not found

Hello,
I am trying to install different plugins for CKEditor in my xwiki. From what I understood from the documentation CKEditor Integration (XWiki.org), I proceeded like that :

  1. Extract the .war archive (xwiki-platform-distribution-war-14.10.5.war) present in my xwiki folder
  2. Created the “ckeditorPlugins” folder in the “resources” folder of the war archive
  3. Downloaded each of the plugins with "nmp pack , extracted them and placed them in folders under the ckeditorPlugins folder
  4. Make a .war again and replace the old one, restart the wiki entirely
  5. Added a JavaScript Skin Extension object like that :
require(['deferred!ckeditor'], function(ckeditorPromise) {  
    ckeditorPromise.done(function(ckeditor) {  
        ckeditor.plugins.addExternal('pagination', "$xwiki.getSkinFile('ckeditorPlugins/ckeditor-ckeditor5-pagination-40.1.0/ckeditor5-metadata.json')");
        ckeditor.plugins.addExternal('page-break', "$xwiki.getSkinFile('ckeditorPlugins/ckeditor-ckeditor5-page-break-40.1.0/ckeditor5-metadata.json')");
        ckeditor.plugins.addExternal('export-word', "$xwiki.getSkinFile('ckeditorPlugins/ckeditor-ckeditor5-export-word-40.1.0/ckeditor5-metadata.json')");
        ckeditor.plugins.addExternal('export-pdf', "$xwiki.getSkinFile('ckeditorPlugins/ckeditor-ckeditor5-export-pdf-40.1.0/ckeditor5-metadata.json')");
    });
}); 
  1. Saved this object with the parameters : Use this extension : On this wiki; Parse content : Yes, Caching policy : Long
  2. Activated the plugins by going in the “Advanced Configuration” of the “WYSIWYG Editor” and adding the line : config.extraPlugins = 'pagination,page-break,export-word,export-pdf';

Now, when I go to edit a page on my wiki, it loads for forever and prints in the console “Uncaught Error: [CKEDITOR.resourceManager.load] Resource name “pagination” was not found at “/xwiki/skins/flamingo/ckeditorPlugins/ckeditor-ckeditor5-pagination-40.1.0/ckeditor5-metadata.json?t=N1HE””, and I don’t know what to do to make it work, please help !
By the way, in the documentation, the different plugins are in JS, but when downloaded via the ckeditor website they’re a full archive, and apparently the plugin is the “matadata.json” file, so that’s what I referenced to try and make it work.

Are you trying to use CKEditor 5 plugins with CKEditor 4 available in XWiki? I doubt this can work. AFAIK CKEditor 5 is completely different from CKEditor 4 so they can’t share plugins.

Try with some CKEditor 4 plugins, and be sure to reference the JavaScript file, not the JSON.

Hope this helps,
Marius

Hi ! Thanks, I didn’t know about that, so I tried with CKEditor 4 plugins with the same steps in my post, and I still can’t get i to work.
My first problem is that the editor is looking for the scripts in the /skins/flamingo folder, and I don’t know why or how to fix it.
The second problem is that my editor won’t load anymore. In the console, I have the error “Uncaught TypeError: Cannot read properties of undefined (reading ‘toolbar’)” and I don’t know what to do about it, nor do I inderstand it. I downloaded the plugin on the official page I think (Page Break | CKEditor.com) and I dont know what to try next.
Thanks a lot for your time.

Usually this is a sign that it couldn’t find the JavaScript file in resources/ ckeditorPlugins/... so I’d double-check the path.