N°9128 - Update CKEditor5 to v48 base on 3.2#896
Conversation
… attribute selectors
|
@greptileai review please :) |
|
| 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
Reviews (1): Last reviewed commit: "Fix font size/color for 3.2 portal" | Re-trigger Greptile
Base information
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
Checklist of things to do before PR is ready to merge