How should you approach upgrading CKEditor 4 to CKEditor 5?
If you're updating your site from Sector 9 to Sector 10, you'll need to move to the latest version of CKEditor (this is commonly used for adding content in the 'body' field). In this blog post we go over some approaches you can use when migrating to CKEditor 5.
Not sure of the differences between CKEditor 4 and 5?
See our documentation on the changes between CK4 and CK5.
So far, a staggered approach has been a suitable option for several Sector websites - this means upgrading CKEditor while a website is still on Sector 9, with the intention of updating to Sector 10 later.
Before you start moving from CKEditor 4 to CKEditor 5, begin by reviewing how CKEditor is used on your website. Consider the following:
- What features of CKEditor do you currently use?
- How would feature differences affect your site?
- Do you use CKEditor templates?
- Are any previously free features now paid features?
Our Changes between CK4 and CK5 documentation page has a handy table of feature differences, so you can review that with your site in mind.
Once you've worked out how basic or advanced your usage of CKEditor is, you can plan your upgrade - we've suggested two possible approaches below.
1️⃣ - You use basic features and aren't affected by feature differences
If you decide your website uses CKEditor in a fairly simple way, Acquia's automated approach to upgrading to CK5 could work for you.
In summary, this update approach is:
- Find modules that provide CKEditor 4 plugins
- Determine CKEditor 5 readiness of contrib modules
- Upgrade custom modules
- Install CKEditor 5
- Upgrade text formats (automated)
- Uninstall CKEditor 4 module
You can learn more in the tutorial on Acquia's website.
2️⃣ - You use advanced features and are affected by feature differences
If you discover your website uses CKEditor in a way that is custom or advanced, we recommend an approach with a more gradual upgrade to CKEditor 5. In this approach, you switch to CKEditor 5 in Sector 9 using the Sector 10 text formats - which will look like this:
- Install CK5
- Install the Sector 10 text formats
- Close any site-specific gaps
- Map text formats
- Make sure nothing is stripped by new text filters
For both approaches, it's important to thoroughly test the upgraded CKEditor by trying out all the ways you'd normally use it - make sure all the usual features are there, they work as expected, and your content displays as it did before the upgrade.
Keep an eye on the Sector blog for more advice around updating your site to Sector 10!