Skip to content

Conversation

@Fredx87
Copy link
Contributor

@Fredx87 Fredx87 commented Oct 16, 2025

This PR updates CKEditor to the latest available version (v47.2.0). This brings in the latest improvement and bug fixes, and it fixes the reported security vulnerabilities (even if they are related to plugins we are not using).

It is worth noting that CKEditor v47 is the first LTS release: https://ckeditor.com/docs/ckeditor5/latest/updating/guides/update-to-47.html#long-term-support. I am not sure if our license covers LTS, but it will come in handy in the future in case we want to migrate to a still-supported version without breaking changes.

Main changes:

  • Updated CKEditor to v47.1.0, using the new method for replacing the default icons using an internal NPM package. We use the same method in the Knowledge Admin client repo.
  • Moved all deps to devDependencies. This library is built as a UMD module, which means that all dependencies are bundled in the final main.js file, and the consumer of this package doesn't need to install them.
  • Fixes for the CommunityMentionsPlugin
    • fixed styles to match the style changes in CKEditor v46
    • fixed the MentionsDataProcessor class that was not working anymore, using different APIs to manipulate the elements

I set the changeset to release a major version. The package has been around for a while, and we are still at version 0.1.1. I think it is time to release a proper v1.0.0.

[Jira issue] https://zendesk.atlassian.net/browse/GG-4331
[Z2] https://support.zendesk.com/agent/tickets/13528906

@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: 1ef057f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@zendesk/help-center-wysiwyg Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Fredx87 Fredx87 force-pushed the gianluca/GG-4331/update-ckeditor branch 2 times, most recently from 6f7634f to c302125 Compare October 21, 2025 15:18
process.env.NODE_ENV === "production"
? process.env.CKEDITOR_LICENSE_KEY_PRODUCTION
: process.env.CKEDITOR_LICENSE_KEY_DEVELOPMENT,
: process.env.CKEDITOR_LICENSE_KEY_DEVELOPMENT || "GPL",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed since licenseKey is mandatory from v44: https://ckeditor.com/docs/ckeditor5/latest/updating/guides/update-to-44.html#required-license-key-configuration.

With this fallback, anybody can run yarn start to launch the dev mode without the need to specify a license. For the production build, we always want to use a proper key instead

@Fredx87 Fredx87 marked this pull request as ready for review October 21, 2025 15:41
@Fredx87 Fredx87 requested a review from a team as a code owner October 21, 2025 15:41
@Fredx87 Fredx87 force-pushed the gianluca/GG-4331/update-ckeditor branch from c302125 to cf44550 Compare November 10, 2025 12:46
This package is built as a UMD bundle, so none of its dependencies are
required at runtime.
…nipulation

With the new versions of CKEditor, the method used to convert the mention elements
between the view and data formats has stopped working.

This commit refactors the MentionsDataProcessor to use the proper CKEditor API for
manipulating view elements, specifically the ViewUpcastWriter class.
@Fredx87 Fredx87 force-pushed the gianluca/GG-4331/update-ckeditor branch from cf44550 to 1ef057f Compare November 27, 2025 10:43
@Fredx87 Fredx87 merged commit 4c66182 into main Nov 27, 2025
2 checks passed
@Fredx87 Fredx87 deleted the gianluca/GG-4331/update-ckeditor branch November 27, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants