Migration to CKEditor 5 v32.0.0
When updating your CKEditor 5 installation, make sure all the packages are the same version to avoid errors.
For custom builds, you may try removing the package-lock.json
or yarn.lock
files (if applicable) and reinstalling all packages before rebuilding the editor. For best results, make sure you use the most recent package versions.
For the entire list of changes introduced in version 32.0.0, see the changelog for CKEditor 5 v32.0.0.
Listed below are the most important changes that require your attention when upgrading to CKEditor 5 v32.0.0.
# Bump of minimal version of Node.js to 14.x
Node.js 12 ends its long-term support in April 2022. Because of that, starting from v32.0.0, the minimal version of Node.js required by CKEditor 5 will be 14.
# The ListStyle
plugin is now deprecated
Due to the introduction of the new list properties, the ListStyle
plugin used so far became obsolete as it was replaced by the ListProperties
plugin. Please refer to the list feature installation guide for details on how to handle the upgrade.
# Revision history
The revision history feature was adapted to the upcoming support for real-time editing integration. Unfortunately, this introduced several breaking changes for the non-real-time integrations as well. You can find the migration instructions below. We also recommend revisiting the revision history integration guide.
In case of any problems with migrating to CKEditor 5 v32.0.0, please contact our support team.
# Revisions data
The revision model has changed along with the list of properties stored in the database. Below is the summary of the changes:
- New properties
#fromVersion
and#toVersion
were added and need to be stored in your database. For existing revisions, set the value of these properties. - Revision ID for the initial revision will be set to the document ID or to the
'initial'
value. Make sure that you either set thecollaboration.channelId
configuration variable or allow for storing multiple revisions with the same ID (among different documents). - The
Revision#isLocked
property was removed as it is no longer needed. You may remove it from the revisions saved in your database. - The
Revision#data
property was renamed to#diffData
. Rename this property for revisions stored in your database.
Please adjust your integration so that the revision data is properly saved in your database.
# Revision history adapter
The adapter interface has changed:
The RevisionHistoryAdapter#getRevisions()
method was removed. You will need to fetch and add the revisions data directly in the adapter:
Keep in mind that you can still pass the revisions data (revisionsData
) straight in the web page source instead of making an asynchronous call.
The adapter methods #addRevision()
and #updateRevision()
were removed in favor of #updateRevisions()
which needs to be implemented. The new method updates and/or saves one or multiple revisions in a single request. The input parameter is an array of objects containing revisions data. These may be either new revisions or existing revisions. Every object contains a revision ID, which should be checked to verify if a given revision already exists in your database. For new revisions, the data object contains all revision data. For existing revisions, only updated properties are passed:
# Revision history API and autosave integration
The RevisionTracker#updateRevision()
method was removed in favor of #update()
and #saveRevision()
.
Before, #updateRevision()
could either update the most recent revision or create a new revision (if the most recent revision was locked earlier). Now, the revision lifecycle was simplified and “locking” is no longer needed. The #updateRevision()
utility was split into two, more “precise” methods, that more clearly communicate the outcome of their use. We believe that the new approach is easier to understand.
These methods may have been used in your autosave integration. Please refer to the documentation to see updated autosave integration examples.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.