What is ckeditor5?
CKEditor 5 is a modern JavaScript rich text editor with a modular architecture. It offers a wide range of features and is highly customizable, making it suitable for various types of content editing needs.
What are ckeditor5's main functionalities?
Basic Text Editing
This code initializes a basic CKEditor 5 instance with classic build, allowing users to perform basic text editing tasks such as bold, italic, and underline.
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
ClassicEditor.create(document.querySelector('#editor'))
.then(editor => {
console.log('Editor was initialized', editor);
})
.catch(error => {
console.error(error);
});
Custom Plugins
This code demonstrates how to initialize CKEditor 5 with custom plugins. In this example, only the Bold and Italic plugins are included, and the toolbar is customized to show only these options.
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
ClassicEditor.create(document.querySelector('#editor'), {
plugins: [Essentials, Bold, Italic],
toolbar: ['bold', 'italic']
})
.then(editor => {
console.log('Editor was initialized with custom plugins', editor);
})
.catch(error => {
console.error(error);
});
Real-time Collaboration
This code initializes CKEditor 5 with real-time collaboration features, allowing multiple users to edit the same document simultaneously and see each other's changes in real-time.
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import RealTimeCollaborativeEditing from '@ckeditor/ckeditor5-real-time-collaboration/src/realtimecollaborativeediting';
import RealTimeCollaborativeComments from '@ckeditor/ckeditor5-real-time-collaboration/src/realtimecollaborativecomments';
ClassicEditor.create(document.querySelector('#editor'), {
plugins: [RealTimeCollaborativeEditing, RealTimeCollaborativeComments],
toolbar: ['comment', 'trackChanges']
})
.then(editor => {
console.log('Editor was initialized with real-time collaboration', editor);
})
.catch(error => {
console.error(error);
});
Other packages similar to ckeditor5
tinymce
TinyMCE is another popular rich text editor that offers a wide range of features and customization options. It is known for its ease of integration and extensive plugin library. Compared to CKEditor 5, TinyMCE has a more traditional architecture but offers similar functionalities.
quill
Quill is a lightweight, open-source rich text editor with a focus on simplicity and extensibility. It provides a clean API and is highly customizable. While it may not have as many built-in features as CKEditor 5, it is a good choice for projects that require a simple and flexible editor.
draft-js
Draft.js is a rich text editor framework for React, developed by Facebook. It provides a lot of flexibility and control over the editor's behavior and appearance. Unlike CKEditor 5, which is a complete solution, Draft.js is more of a toolkit for building custom editors.
CKEditor 5
CKEditor 5 is a modern JavaScript rich-text editor with MVC architecture, custom data model, and virtual DOM, written from scratch in TypeScript with excellent support for modern bundlers. It provides every type of WYSIWYG editing solution imaginable with extensive collaboration support. From editors similar to Google Docs and Medium to Slack or Twitter-like applications, all is possible within a single editing framework. As a market leader, it is constantly expanded and updated.
Table of contents
Quick start
Refer to the Quick Start guide to learn more about CKEditor 5 installation.
CKEditor 5 Builder
The easiest way to start using CKEditor 5 with all the features you need is to prepare a customized setup with the CKEditor 5 Builder. All you need to do is choose the preferred editor type as a base, add all the required plugins, and download the ready-to-use package.
TypeScript support
CKEditor 5 is a TypeScript project. Starting from v37.0.0, it offers native type definitions. Check out our dedicated guide to read more about TypeScript support.
CKEditor 5 advanced installation
For more advanced users or those who need to integrate CKEditor 5 with their applications, we prepared integrations with popular JavaScript frameworks:
CKEditor 5 Framework
CKEditor 5 is also a framework for creating custom-made rich text editing solutions.
To find out how to start building your editor from scratch go to the CKEditor 5 Framework overview section of the CKEditor 5 documentation.
Documentation and FAQ
Extensive documentation dedicated to all things CKEditor 5-related is available. You will find basic guides that will help you kick off your project, advanced deep-dive tutorials to tailor the editor to your specific needs, and help sections with solutions and answers to any of your possible questions. To find out more refer to the following CKEditor 5 documentation sections:
For FAQ please go to the CKEditor Ecosystem help center.
For a high-level overview of the project see the CKEditor Ecosystem website.
Releases
Follow the CKEditor 5 changelog for release details and check out the CKEditor 5 release blog posts on the CKSource blog for important release highlights and additional information.
Editing and collaboration features
The CKEditor 5 Framework offers access to a plethora of various plugins, supporting all kinds of editing features.
From collaborative editing support providing comments and tracking changes, through editing tools that let users control the content looks and structure such as tables, lists, and font styles, to accessibility helpers and multi-language support - CKEditor 5 is easily extensible and customizable. Special duty features like Markdown input and output and source editing, or export to PDF and Word provide solutions for users with diverse and specialized needs. Images and videos are easily supported and CKEditor 5 offers various upload and storage systems to manage these.
The number of options and the ease of customization and adding new ones make the editing experience even better for any environment and professional background.
Refer to the CKEditor 5 Features documentation for details.
Contributing and project organization
Ideas and discussions
The development repository of CKEditor 5 is located at https://github.com/ckeditor/ckeditor5. This is the best place for bringing opinions and contributions. Letting the core team know if they are going in the right or wrong direction is great feedback and will be much appreciated!
Development
CKEditor 5 is a modular, multi-package, monorepo project. It consists of several packages that create the editing framework, based on which the feature packages are implemented.
The ckeditor5
repository is the place that centralizes the development of CKEditor 5. It bundles different packages into a single place, adding the necessary helper tools for the development workflow, like the builder and the test runner. Basic information on how to set up the development environment can be found in the documentation.
See the official contributors' guide to learn how to contribute your code to the project.
Reporting issues and feature requests
Report issues in the ckeditor5
repository. Read more in the Getting support section of the CKEditor 5 documentation.
License
Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md
file or https://ckeditor.com/legal/ckeditor-oss-license.
43.2.0 (October 2, 2024)
We are happy to announce the release of CKEditor 5 v43.2.0.
Release highlights
Notable improvements
- Operational Transformation Stability: Significant changes have been made to the OT system, enhancing the undo functionality and real-time collaboration, especially in conflict resolution scenarios. These improvements ensure smoother editor operations during complex interactions.
- Performance Improvements: We have merged several community-driven performance enhancements (thanks @sunesimonsen), that optimize the editor’s core engine. While no changes to the editor’s logic were made, these updates improve overall efficiency and responsiveness.
More imports available via ckeditor5
and ckeditor5-premium-features
indexes
As users transition to new installation methods (v42.0.0+) with ckeditor5
and ckeditor5-premium-features
as the main packages, we are continuously addressing missing imports for less common classes, functions, types, and utilities, broadening their availability. Since our TypeScript rewrite (v37.0.0), imports can now be made directly through the package indexes, simplifying integration. As many users historically imported from src
, we encourage you to try the new version and report any missing imports. In the future, we are considering removing src
from published packages to reduce package size, so the more feedback we receive, the better and more stable API we will provide.
Features
Bug fixes
- ckbox: Editing inline images using
CKBox
no longer changes and reinserts them simultaneously. Closes #17056. (commit) - engine: Fixed incorrect marker handling in some scenarios involving undo and real-time collaboration, which earlier led to a
model-nodelist-offset-out-of-bounds
error. See #9296. (commit) - engine: Fixed incorrect handling of merge changes during undo in some scenarios involving real-time collaboration, which earlier led to a
model-nodelist-offset-out-of-bounds
error. See #9296. (commit) - engine: Fixed conflict resolution error, which led to editor crash in some scenarios where two users removed larger intersecting part of the content and used undo. See #9296. (commit)
- engine: Fixed incorrect undo behavior leading to an editor crash when a user pressed <kbd>Enter</kbd> key multiple times, then pressed backspace that many times, then undid all the changes. Closes #9296. (commit)
- theme-lark: Increased the specificity of the dropdown menu panel styles to address issues with incorrect
z-index
ordering. (commit) - ui: Fixed scrolling in dropdowns when a block toolbar button is active. Closes #17067. (commit)
- ui: Increased the specificity of the dropdown menu panel styles to address issues with incorrect
z-index
ordering. (commit)
Other changes
Released packages
Check out the Versioning policy guide for more information.
<details>
<summary>Released packages (summary)</summary>
Releases containing new features:
Other releases:
</details>