Jodit plugins are designed to extend the basic functionality of the editor.
There are built-in plugins, without which the editor will not work correctly. There are plugins that add completely new functionality.
You can write your own plugin that will either change the current behavior of the editor or add a new function.
Plugins can be both simple functions and complex classes.
In the simplest case, it's just a function that receives a Jodit instance as input.
Buttons to be automatically added to the editor's button groups.
Those. if the plugin is connected, the button will appear in the list, if not connected, it will disappear.
Since version 3.12.4 you can disable all Jodit plugins during development and work only with your own plugin.
This will allow you to find out if it works correctly and if it breaks the behavior of the editor or if it is caused by other plugins.
Jodit plugin system
Jodit plugins are designed to extend the basic functionality of the editor. There are built-in plugins, without which the editor will not work correctly. There are plugins that add completely new functionality. You can write your own plugin that will either change the current behavior of the editor or add a new function.
Plugins can be both simple functions and complex classes.
In the simplest case, it's just a function that receives a Jodit instance as input.
The moment you create an instance of Jodit, all plugins are initialized.
This is usually not what you expect. You probably want the plugin to take action on certain events. The EventEmiter editor will help you with this.
As mentioned above, plugins can be more complex than just a function. A plugin can be a class:
hasStyle
Jodit will try to load the styles along the same path as the plugin is loaded.
buttons
[]
Buttons to be automatically added to the editor's button groups. Those. if the plugin is connected, the button will appear in the list, if not connected, it will disappear.
static requires
If your plugin depends on other plugins, then it must be initialized after them.
Debug
Since version
3.12.4
you can disable all Jodit plugins during development and work only with your own plugin. This will allow you to find out if it works correctly and if it breaks the behavior of the editor or if it is caused by other plugins.