Plugins in CKEditor 5
Features in CKEditor are introduced by plugins. In fact, without plugins, CKEditor 5 is an empty API with no use. The predefined builds provided with CKEditor 5 are actually predefined collections of plugins, put together to satisfy specific needs.
Plugins provided by the CKEditor core team are available in npm (and GitHub, too) in the form of npm packages. A package may contain one or more plugins (for example, the
@ckeditor/ckeditor5-image package contains several granular plugins).
# Common use cases
Plugins can be pretty much anything. They are pieces of code initialized by the editor if they are configured to be loaded. They can use the richness of the CKEditor 5 Framework API to enhance the editor or to better integrate it with your application.
Common use cases for plugins are:
- Editing features, like bold, heading, linking, or any other feature that the user can use to manipulate the content.
- Adding semantic value to the content, like annotations or accessibility features.
- Third-party services integration, for injecting external resources into the content, like videos or social network posts.
- Handling image upload and image manipulation features.
- Providing widgets for easy integration with application structured data.
- Injecting analysis tools that help enhance the quality of the content.
- And other infinite possibilities.
# Creating plugins
Creating your own plugins is a straightforward task but it requires good knowledge about some aspects of the CKEditor 5 development environment. The following resources are recommended as a starting point:
- The Plugin development guide in the CKEditor 5 Framework documentation.
- The Using package generator, that provides a plugin development environment.
- The Quick start guide in the CKEditor 5 Framework documentation.
- Creating custom builds which is necessary to have your plugin included inside a CKEditor 5 build.
A good understanding of the CKEditor 5 Framework is also welcome when it comes to creating plugins.
# Using third-party plugins
A great way to enhance your builds with additional features is by using plugins created by the community. Such plugins are available as npm packages, so a quick search on the “ckeditor5” keyword in npm should work as a starting point.
Once you have plugins you want to include, learn how to install them.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.