Skip to content

v40.0.0

Compare
Choose a tag to compare
@psmyrek psmyrek released this 04 Oct 12:17
· 5326 commits to master since this release

We are happy to announce the release of CKEditor 5 v40.0.0.

Release highlights

AI Assistant

We are tremendously excited to share our AI Assistant plugin with you!

With the AI Assistant, you can boost your editing effectiveness and creativity in a completely new way. This feature gives writers and editors the power to seamlessly interact with artificial intelligence. Users can generate, expand, rewrite, improve, translate, and process the content in many different ways.

The AI Assistant can be used in two ways. You can quickly re-work selected content by choosing one of the predefined AI commands. Or, you can write your own query to generate or process the content in any way you like!

Make sure to visit the documentation and try the demo!

Introduction of the image height and width support

No more layout shifts! We have introduced setting of the image width and height attributes automatically during the upload/paste process to ensure the highest-quality content with no text jumping all around. While existing images won't be automatically retroactively altered, any changes to images in the editor (like resizing) will automatically set these attributes.

We've also ensured backward compatibility with CKEditor 4, particularly while maintaining user-changed aspect ratios. More details on the changes can be found in the update guide.

Drag and drop of blocks

Just drag it!™ We have introduced a more intuitive drag-and-drop functionality for blocks and widgets. This makes content rearrangement and editing faster and easier, offering users better control over their content. Dragging by the balloon block toolbar handle is also possible, and we've updated its default icon to reflect this new drag-and-drop capability better (but it's still changeable).

Document lists feature parity

Document lists — our second-generation list plugin that supports multiple content blocks in list items — have finally landed the support for to-do lists! We also added the configuration that enforces the document list to have only a single block inside the list item (we call it “simple lists”). All this is to start deprecating the Lists v1 implementation and use the document lists as default. Coming soon!

Contextual balloon fixes

Last but not least, we prepared significant fixes to the way the contextual balloons work. They had the tendency to overflow on other elements, especially in the fixed height editors. We polished their internals, and problems should exist no more!

Please refer to the update guide to learn more about these changes.

MAJOR BREAKING CHANGES ℹ️

  • image: The model attribute name of the resized image has been changed to resizedWidth. The width and height attributes are now used to preserve the image's natural width and height.
  • image: The srcset model attribute has been simplified. It is no longer an object { data: "...", width: "..." }, but a value previously stored in the data part.

MINOR BREAKING CHANGES ℹ️

  • comments: The comment thread's "resolved" state has been separated from the "unlinked" state (a state, when the related editor content was removed from the document). A thread can have any combination of these states. If a comment thread is either "resolved" or "unlinked", it is moved to the comments archive. This new approach is reflected in the comments archive UI. Notably, an "unlinked" comment thread can become resolved and reopened while still being in the comments archive. Additionally, the "unlinked" comment threads have a gray header color to differentiate them from the "resolved" comment threads.
  • comments: The Comment#archivedAt is now the property to check when deciding whether the comment thread is inside the comments archive or not (that property was #resolvedAt before).
  • comments: CommentsArchive#resolvedThreads has been renamed to #archivedThreads. If your custom code used that property, make sure to apply this change.
  • comments: The deletedAt property is no longer passed in AddCommentThreadEvent as it is not needed anymore. Instead, deleted comment threads should never be handled in addCommentThread as they should never be added to the repository. If your custom code used that property, make sure to apply this change.
  • comments: In a real-time collaboration environment, removed comment threads will no longer be added to CommentsRepository after re-initializing the editor. Before, the comment thread was removed from CommentsRepository but was added back when the editor re-connected to Cloud Services. If your custom code expected the old (incorrect) behavior, it might need a change. This change was reflected in the comments outside editor documentation page.

Features

  • ai: Introduced the AI assistant feature.
  • clipboard: Enabled the block drag and drop by default. Closes #14734. (commit)
  • clipboard: Extended the drag and drop selection to parent elements when all their children are selected. Closes #14640. (commit)
  • image: The image width and height attributes are now preserved while loading editor content. Closes #14146. (commit)
  • image: Images without a specified size will automatically gain natural image width and height dimensions on any interaction with the image. See #14146. (commit)
  • list: Allow restricting list item content to a single text block by disabling the list.multiBlock configuration option. Closes #14634. (commit)
  • list: Introducing the to-do lists compatible with the document list feature. Closes #14663. (commit)
  • ui: Implemented new UI components: ListItemGroupView, TextareaView, SpinnerView, SearchView and AutocompleteView. (commit)
  • ui: Introduced the HighlightedTextView component for better search results presentation. (commit)

Bug fixes

  • clipboard: Improved displaying preview of the drag and drop content. Closes #14968. (commit)
  • comments: Comment threads that were permanently deleted will be removed from CommentsRepository and, in case of real-time collaboration, they will not be added back after re-connecting to the document.
  • engine: The editor wil no longer throw an error when clicking on a balloon with input on Firefox. Closes #9635. (commit)
  • image: Image should not be replaced when dropped below a widget. Closes #14710, #14740. (commit)
  • list: A dragged whole list item should still be a list item when dropped. Closes #14969. (commit)
  • mention: Fixed typing of the Mention#toMentionAttribute() method. Closes #14923. (commit)
  • utils: Balloon panels should not stick out of the visible part of the editor while scrolling. (commit)
  • utils: Fixed wrong tooltip when hovering over the toolbar buttons in Chrome on iOS. Closes #13812. (commit)
  • utils: The coordinates of an element are now correctly calculated relative to the positioned ancestor element. Closes #14992. (commit)

Other changes

  • comments: Introduced the Comment#unlinkedAt and Comment#archivedAt properties and the Comment#setUnlinkedAt() method.
  • comments: The deletedAt property is no longer passed in AddCommentThreadEvent as it is not needed anymore.
  • comments: Renamed CommentsArchive#resolvedThreads to #archivedThreads.
  • comments: Comment threads are no longer treated as "resolved" when their related content is removed from the document. These threads are now in the "unlinked" state.
  • theme-lark: Improved the drag and drop target line. Closes #14645. (commit)
  • ui: Made the ButtonView label logic open for extension. (commit)
  • ui: Changed the default icon for the BallonEditor toolbar handle and added the ability to customize it. Closes #14646. (commit)
  • Optimized icons. (commit)
  • Updated translations. (commit, commit, commit)
  • Added support to execute the yarn run clean-up-svg-icons script without arguments to optimize all icons in the entire project. Closes #14912. (commit)

Released packages

Check out the Versioning policy guide for more information.

Released packages (summary)

New packages:

Major releases (contain major breaking changes):

Minor releases (contain minor breaking changes):

Other releases: