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:
After downloading the CKEditor 5 zip, extract the contents and add the JavaScript file to the Static Application or Workspace Files area. The JS file will then need to be referenced on the page that it will be used either globally if it is to be used in multiple places, or directly on the page by adding the Static File Reference to the Javascript File URLs on the page it is to be used on.
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.
If you would like any support regarding APEX speak to one of our expert Oracle APEX Consultants today. Alternatively, email us at enquiries@dsp.co.uk or book a meeting.