ARTICLE AD BOX
I am trying to integrate a custom CKEditor 5 plugin (LanguageTool) into Drupal 10 using a custom module. The plugin builds successfully, but when Drupal loads the editor, the browser console shows:
CKEditorError: plugincollection-plugin-not-found {"plugin": null}The editor loads, but the custom plugin does not initialize.
Created a CKEditor 5 custom build with the plugin included.
Ran npm install and npm run build.
Copied the generated build/ckeditor.js into my Drupal custom module.
Created a Drupal CKEditor5 plugin class:
/** * @CKEditor5Plugin( * id = "ckeditor5_languagetool_plugin", * label = @Translation("LanguageTool") * ) */ class LanguageTool extends CKEditor5PluginBase { public function getPlugins() { return [ 'LanguageTool' ]; // JS pluginName } }Added library in my_module.libraries.yml
Enabled plugin in text format
Cleared caches (drush cr)
The error indicates that Drupal is requesting a CKEditor plugin with name "null", which usually means:
Plugin ID mismatch
Plugin name in text format config does not match PHP annotation
JS pluginName does not match getPlugins() return value
But after checking, I still see the error.
PHP plugin class
/** * @CKEditor5Plugin( * id = "ckeditor5_languagetool_plugin" * ) */ class LanguageTool extends CKEditor5PluginBase { public function getPlugins() { return [ 'LanguageTool' ]; } }JS plugin
export default class LanguageTool extends Plugin { static get pluginName() { return 'LanguageTool'; } }Text format config
ckeditor5.plugin.ckeditor5_languagetool_plugin: enabled: trueShould the Drupal plugin ID (ckeditor5_languagetool_plugin) match directly with the JS pluginName or only with the text format entry?
Are there any known issues about custom plugin loading with Drupal CKEditor 5 integration?
Is there a debugging method to see which plugin name Drupal is sending to CKEditor?
Am I missing any step in mapping the Drupal plugin to CKEditor’s pluginName?
Drupal 10.x
CKEditor 5 custom build
Custom Drupal module
PHP 8.1
Browser: Chrome
