As is the case with web technologies, time moves on, and so does the usability, design and features of these technologies. That is no less the case with rich text editors.
In previous versions of APEX, the rich text editor item used the CKEditor 4 editor, but with the release of 20.2, the CKEditor 4 editor was deprecated from APEX, and CKeditor 5 was the editor APEX started to use. This had more features and a more modern UI.
I was asked by a customer to implement the CKEditor 5 editor in a 19.2 APEX application. They were not planning to upgrade anytime soon but wanted to utilise the additional features of the newer editor. After a bit of research, I managed to create a PoC page with the CKeditor 5 implemented. I've outlined the steps I took to achieve this below:
The editor then needs to be initialised:
This is enough to get the editor on the page and the text pre-populated with the item value created above.
The next step is to create the process of extracting the value from the editor and saving it back.
If you want the benefits of the newer CKEditor 5 but are not in a position to upgrade your APEX applications, then this is a simple way to implement the new editor. It allows you to initialise, use the new RTE and its features as well as send and retrieve text to and from the RTE in both pre and post-processing procedures.