How to Create Custom plugin in Drupal Ckeditor 5 | TO THE NEW Blog
Summary
The CKEditor 5 Premium Features module expands on the default functionality offered in the core. • Revision History (to see what changes were made and compare and restore previous versions of the content) • Notification, Export to PDF & Word, Import from Word, Full-screen mode, etc To enable the Premium feature in Drupal 10, we need to purchase the license & enable/configure this module. CKE 5 Provides a set of rich debugging tools for editor internals like model, view, and commands. Step : 2 Download dependency: From the module root directory, run the command npm install (it will download all the dependencies in node_module folder, which is mentioned in package.json) Step: 3 Make a build: Within the root directory of the module, we need to run npm run build It will make the build and will create a file within the /js/build/{plugin_name.js} automatically. That’s it Drupal plugin is created; we can enable it in the editor, Default plugin name is simple_box_demo Let’s Understand the some file uses & workflow There are two ways to enable plugins either yml or PHP class For creating Drupal configuration, we need to create a Drupal CKEditor plugin with in/src/Plugin/CKEditor5Plugin/PLUGIN_NAME.php package.json: Within this file, we need to declare the CKEditor dependency & web pack config, which will help to download the CKE dependency & make a build with npm/yarn webpack.config.js: Within this file we need to declare the path & configuration about the build Drupal uses the concept of DLL build, based on the configuration/path it will create the build.