npm ckeditor5 48.5.0
v48.5.0

5 hours ago

We are happy to announce the release of CKEditor 5 v48.5.0.

Release highlights

⭐ AI Chat: better HTML awareness and context handling

AI Chat now better understands the General HTML Support configuration. The editor shares which additional HTML elements, classes, styles, and attributes are allowed in the content, so the AI produces replies that respect your content rules. Read more about how the AI adapts to your setup in the feature understanding guide.

We also made the Context Library available directly to users in the chat. Enable the new config.ai.chat.context.contextLibrary option to add the library to the "Add context" menu of AI Chat, where users attach a context to the conversation like any other resource. The list shows only the contexts the user token grants access to, and once the first message is sent, the context stays attached for the whole conversation. Learn more about offering contexts in the AI Chat picker.

⭐ AI-assisted suggestions marked in Revision History

AI-generated suggestions can already advertise their origin while they are open in the document. With this release, the same information can be surfaced in Revision History: revisions that include suggestions created with AI features can be visually marked as AI-assisted. Reviewers can tell at a glance which saved revisions involved AI, even after the suggestions were accepted.

The feature is opt-in and disabled by default. Enable it with the new config.revisionHistory.showAISource option. See the documentation for details.

Table improvements

We are making table column resizing more predictable. Columns no longer shrink by a few pixels when resizing starts while the editor content has a vertical scrollbar, and resizing the last column of a nested table by a resizer placed in a header cell no longer stretches that table to the full width of its parent table.

We also improved how table wrapper classes interact with the General HTML Support feature: the content-table and layout-table classes set on the <figure> element wrapping a content table are no longer preserved as arbitrary classes, keeping the output markup clean.

Features

  • ai: Introduced the DocumentCompare API, which captures a snapshot of the document, compares it with a processed version, and applies the resulting difference to the editor directly or as Track Changes suggestions.

  • ai: Improved the AI agent's understanding of the General HTML Support configuration. The agent now recognizes which additional HTML elements, classes, styles, and attributes are allowed in the content.

  • ai: Changed AI Chat context items to match the behavior of file and link attachments. A context item can no longer be removed after the first message is sent, and its badge appears only next to that message.

  • ai: Added a dedicated API method for attaching a Context Library item to the AI Chat context.

  • revision-history: Added the config.revisionHistory.showAISource option for visually marking revisions that include changes created with AI features as AI-assisted, both in the revisions list and when comparing revisions.

  • revision-history: Introduced the revisionHistory.showCommentHighlights configuration option for highlighting comment markers saved in revisions. This option is disabled by default.

    This option never highlights markers for removed or resolved comment threads because Revision History does not restore these comments automatically.

Bug fixes

  • collaboration-core, comments, track-changes: Fixed relative date labels such as "Today" and "Yesterday" to use calendar days instead of elapsed hours. An item created on the previous day is now labeled "Yesterday" regardless of how many hours have passed.
  • collaboration-core, revision-history, track-changes: Fixed errors that occurred when opening the revision history viewer or using Track Changes data in integrations where AI features were registered on a context instead of an editor.
  • ai: Improved error reports from AI features by including details from the point of failure. Previously, error tracking services did not receive these details.
  • ai: Fixed an issue where AI Chat displayed outdated suggested changes while streaming a reply.
  • collaboration-core: Fixed an issue where DocumentCompare produced inaccurate results when General HTML Support was configured to allow the data-id attribute.
  • revision-history: Fixed an issue where RevisionTracker#saveRevision() modified the revision data object passed to it. Previously, reusing this object in multiple calls caused subsequent revisions to reuse the first revision's identifier.
  • revision-history: Fixed an issue where the revision viewer failed to open when the AI chat history feature was enabled.
  • table: Fixed an issue where table columns shrank by a few pixels when resizing started while the editor content had a vertical scrollbar. Closes #20117.
  • table: Fixed an issue where resizing the last column of a nested table using a resizer in a header cell stretched that table to the full width of its parent table.
  • table: Fixed an issue where General HTML Support preserved the content-table and layout-table classes set on the <figure> element wrapping a content table as arbitrary classes.

Other changes

  • comments: Changed annotation activation for overlapping comments and suggestions to target the annotation displayed higher in the sidebar while keeping the other annotation accessible.

Released packages

Check out the Versioning policy guide for more information.

Released packages (summary)

Releases containing new features:

Other releases:

Don't miss a new ckeditor5 release

NewReleases is sending notifications on new releases.