Skip to content

N°9128 - Update CKEditor5 to v48 base on 3.2#896

Merged
steffunky merged 11 commits into
support/3.2from
feature/9128_update_ckeditor5_32_base
Apr 29, 2026
Merged

N°9128 - Update CKEditor5 to v48 base on 3.2#896
steffunky merged 11 commits into
support/3.2from
feature/9128_update_ckeditor5_32_base

Conversation

@steffunky
Copy link
Copy Markdown
Member

Base information

Question Answer
Related to a SourceForge thread / Another PR / Combodo ticket? N°9128
Type of change? Enhancement

Objective (enhancement)

Update CKEditor 5 from v41.4 to v48.0

Proposed solution (bug and enhancement)

Follow CKEditor v48 upgrade guide, only import CKEditor5 npm package, remove most of webpack use (we still need it to get a build), replace our custom Maximize plugin with the new default Fullscreen plugin
Adapt changes required in iTop's code
Fix issues due to bad SCSS

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • Would a unit test be relevant and have I added it?
  • Is the PR clear and detailed enough so anyone can understand without digging in the code?

Checklist of things to do before PR is ready to merge

@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Apr 28, 2026
@steffunky steffunky changed the title Feature/9128 update ckeditor5 32 base N°9128 - Update CKEditor5 to v48 base on 3.2 Apr 28, 2026
@steffunky steffunky marked this pull request as ready for review April 28, 2026 07:47
@steffunky
Copy link
Copy Markdown
Member Author

@greptileai review please :)

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR upgrades CKEditor 5 from v41.4 to v48.0, migrating from the old two-argument ClassicEditor.create(element, config) API to the new single-object API (attachTo + licenseKey: 'GPL'), consolidating the many separate @ckeditor/* packages into the single ckeditor5 npm package, switching translation file loading to .umd.js, replacing the custom Maximize plugin with the built-in Fullscreen plugin, and fixing SCSS @extend incompatibilities with the updated scssphp compiler.

Confidence Score: 4/5

Safe to merge after reviewing the diff_recursive type-handling edge cases in the scssphp Compiler

Only P2 findings present. The diff_recursive function in the scssphp Compiler uses loose in_array comparison and silently drops non-string/non-array values, which could theoretically miss a difference, but in practice SCSS extend parts are string arrays. All other changes are straightforward API migration work.

lib/scssphp/scssphp/src/Compiler.php — the new diff_recursive helper warrants a second look for type-safety

Important Files Changed

Filename Overview
js/ckeditor.handler.js Migrates editor creation to the CKEditor v48 single-object API, adding attachTo and licenseKey: 'GPL'; Object.assign ordering means PHP-supplied aConfiguration can override these defaults, which is intentional for license overrides but subtle
sources/Application/Helper/CKEditorHelper.php Removes deprecated maximize plugin config, switches translation file lookup from .js to .umd.js for CKEditor v48 compatibility; logic is correct
lib/scssphp/scssphp/src/Compiler.php Adds diff_recursive to handle nested array comparisons where array_diff would fail; non-string/non-array values are silently dropped from differences and in_array uses loose typing
css/backoffice/vendors/ckeditor/_overloads.scss Adds --ck-content-font-family CSS variable mapping iTop base font to CKEditor v48 content area
css/backoffice/components/_quick-create.scss Replaces @extend a (broken with new scssphp) with explicit hyperlink SCSS variables; clean fix
datamodels/2.x/itop-portal-base/portal/public/css/portal.scss Adds portal-scoped :root CSS variables for CKEditor v48 font family, size, and color to match backoffice styling
sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php Removes the now-defunct maximize plugin array from the CKEditor config call, aligned with CKEditorHelper.php change
node_modules/ckeditor5-itop-build/package.json Consolidates all separate @ckeditor/* v41.4 packages into a single ckeditor5: ^48.0.0 dependency per the v42+ new installation method

Sequence Diagram

sequenceDiagram
    participant PHP as CKEditorHelper.php
    participant JS as ckeditor.handler.js
    participant CKE as ClassicEditor v48
    participant Trans as umd.js translation

    PHP->>PHP: GetCkeditorConfiguration()
    PHP->>PHP: GetJSFilesRelPathsForCKEditor()
    PHP->>JS: inject json_encode(aConfiguration) via add_ready_script
    JS->>JS: PrepareConfiguration() - resolve AJAX mention feeds
    JS->>CKE: ClassicEditor.create with attachTo and licenseKey GPL merged
    CKE->>Trans: load lang-country.umd.js if locale file exists
    CKE-->>JS: editor instance resolved
    JS->>JS: apply width and height styles
    JS->>JS: store instance and resolve promise
Loading

Reviews (1): Last reviewed commit: "Fix font size/color for 3.2 portal" | Re-trigger Greptile

Comment thread lib/scssphp/scssphp/src/Compiler.php
@steffunky steffunky merged commit de4ec9d into support/3.2 Apr 29, 2026
@steffunky steffunky deleted the feature/9128_update_ckeditor5_32_base branch April 29, 2026 14:56
@steffunky steffunky mentioned this pull request May 11, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants