Skip to main content
Developer System administrator Jahia 8.2

Which CKEditor does Jahia 8.2 use, how do I switch a site to CKEditor 5, and can a plugin update another property?

Question

Which CKEditor does Jahia 8.2 use, how do I switch a site to CKEditor 5, and can a plugin update another property?

Answer

Check which editor you are actually running first

A stock Jahia 8.2 ships CKEditor 4. Verified on 8.2.3.2: of the 49 installed modules, exactly one is a CKEditor module - ckeditor, version 4.21.0-jahia8-8. The CKEditor 5 module is not installed by default.

This matters more than it sounds. If you are following CKEditor 5 documentation, writing a CK5 plugin, or trying to use editor.model and nothing works, the likely cause is that your field is still a CKEditor 4 editor. The two APIs share nothing - a CK5 plugin will not load in CK4, and vice versa.

Note also that CKEditor 4 reached end of life in June 2023; only the paid Extended Support Model receives fixes.

Switching a site to CKEditor 5

CKEditor 5 is a separate Jahia module, richtext-ckeditor5. Install it, then configure it - installing alone is not enough, because the module registers CK5 as a second selector and swaps it in per site when the editor opens.

The switch is an OSGi configuration, org.jahia.modules.richtextCKEditor5.cfg:

enabledByDefault=false

# turn it on for named sites
includeSites[0]=mySite

# or enable it everywhere and opt specific sites out
# enabledByDefault=true
# excludeSites[0]=legacySite

The shipped default is enabledByDefault=false, so nothing changes until you name a site. The same file also takes configs[n].{siteKeys,name,permission} for per-site toolbars and richtextMaxHeight.

A site is resolved at editor-open time: CK5 applies when enabledByDefault is set and the site is not excluded, or the site is listed in includeSites.

Adding a plugin

The two editors have entirely separate mechanisms.

CKEditor 4 uses a config file referenced from your definition:

- text (string, richtext[ckeditor.customConfig='$context/modules/myModule/javascript/config.js'])

and the config file uses CKEditor 4's own API - CKEDITOR.plugins.addExternal(...) plus config.extraPlugins.

CKEditor 5 uses a registry key, ckeditor5-config. Register a named config containing your plugin class and toolbar item, then select it per field with richtext[ckeditor.customConfig='myConfig'].

Model a CK5 plugin on the module's own InsertJahiaImage - a Plugin subclass registering a ButtonView on editor.ui.componentFactory, paired with a Command whose execute() does the work.

Can a plugin update a different Jahia property?

Not directly. The editor instance lives inside the rich text selector component, and that component does not expose the surrounding form to the plugin. What the selector hands the editor is an onChange for its own field only.

Use the Content Editor extension point instead, which targets the selector rather than the editor:

registry.add('selectorType.onChange', 'myBibSync', {
    targets: ['RichText'],
    onChange: (previousValue, currentValue, currentField, editorContext) => {
        editorContext.formik.setFieldValue('myOtherProperty', derive(currentValue));
        editorContext.formik.setFieldTouched('myOtherProperty', true, false);
    }
});

targets: ['RichText'] is correct for both editors: the CK5 module swaps its component in under that same RichText selector key, so the key does not change when a site moves to CK5.

The limitation is that this fires on value change and sees the HTML string, not a button click. For something like a bibliography button, the workable shape is: the plugin inserts a marker into the rich text, and the onChange handler derives the second property from the markers.

See Can a custom Content Editor selector update two properties at once? for the mechanism and, importantly, the three ways a second property is silently dropped on save.

What is on the editor object

That is CKEditor's API, not Jahia's, and it differs completely between the two versions. Jahia adds nothing to the editor object itself - what it does add is a bundle in editor.config, which a plugin reads back with editor.config.get('picker'). Note it contains the Apollo client and the Redux store, so a plugin can run GraphQL - but it does not contain the form, which is why the previous section exists.

Consult CKEditor's own reference for your version, not Jahia's documentation.

Yes, there is an AI Assistant, and it uses OpenAI

The CK5 module ships one. It is not a browser-side call: Jahia proxies requests server-side so the API key is never exposed to the browser, and only users with CK5 richtext permissions can invoke it.

It is configured in its own OSGi file, org.jahia.modules.richtextCKEditor5.ai.openai.cfg:

ai.enabled=true
ai.apiKey=YOUR_OPENAI_API_KEY
ai.apiUrl=https://api.openai.com/v1/chat/completions
#ai.requestParams={"model": "gpt-5-mini"}

Shipped disabled. The AI toolbar buttons appear in the complete and advanced configurations once enabled. It needs a CKEditor premium licence, since the AI Assistant is a CKEditor premium feature.


This article was drafted with AI assistance, then reviewed and curated by Jahia Customer Support engineers before publication.