npm ckeditor5 21.0.0

latest releases: 0.0.0-nightly-20240501.0, 0.0.0-nightly-20240430.0, 0.0.0-nightly-20240429.0...
3 years ago

Release highlights

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

This release packs quite a few all around improvements, including:

We fixed also a handful of bug fixes, for example:

Finally, we also took care of some developer experience-oriented improvements:

Please note that there are some major breaking changes, be sure to review them before upgrading.

Blog post link coming soon…

Collaboration features

The CKEditor 5 Collaboration features changelog can be found here: https://ckeditor.com/collaboration/changelog.

MAJOR BREAKING CHANGES ℹ️

  • The editor.setData() method now clears the undo and redo stacks.
  • engine: The Text#is() and TextProxy#is() methods (in the model and view) now expect to be called with '$text' instead of 'text' and '$textProxy' instead of 'textProxy'.
  • engine: The is() method (e.g. Element#is(), Text#is(), AttributeElement#is() or ContainerElement#is()) in both, the model and the view, no longer treats the first argument as an element name. To check the element's name use the second argument instead (node.is( 'element', 'paragraph' ) instead of node.is( 'paragraph' )).
  • engine: Marker conversion to data has been revamped. The data format changed, the new conversion helpers were introduced and a new rule has been implemented that a comma (,) is not allowed in a marker name. See the GitHub issue for a walkthrough and example migration path.
  • engine: The DomConverter#getParentUIElement() method was renamed to DomConverter#getHostViewElement() because now it supports both UIElement and RawElement (see #4469).

MINOR BREAKING CHANGES ℹ️

  • engine: The bindTwoStepCaretToAttribute() utility function has been removed. Use editor.plugins.get( TwoStepCaretMovement ).registerAttribute() instead.
  • table: The findAncestor() utility function was removed.
  • table: The parameters of TableUtils#createTable() has changed. Use options object to pass number of rows and columns.
  • table: The removeEmptyRows() and removeEmptyRowsColumns() utility functions does not require the batch parameter any more.
  • table: The downcastTableHeadingRowsChange() downcast converter has been removed. It is no longer possible to override headingRows attribute change in a single converter. This behavior can be customized using a table downcast converter. See #7601.

Features

  • autoformat: Block autoformat can also be triggered in blocks other than a paragraph. Closes #6170. (commit)
  • autoformat: Enabled autoformat feature also for blocks that are not empty. (commit)
  • engine: Implemented the view RawElement. Added the DowncastWriter#createRawElement() method. Closes #4469. (commit)
  • engine: The method DataController#set() is now decorated so plugins can listen to editor.setData() calls. (commit)
  • engine: Introduced a new marker conversion helpers that produce semantic HTML data output. See DowncastHelpers#markerToData() and UpcastHelpers#dataToMarker(). Closes #7556. (commit)
  • engine: Added model Position#findAncestor() and Element#findAncestor() methods. Closes #3233. (commit)
  • engine: Changed the visibility scope of Mapper#findPositionIn() from private to public. (commit)
  • engine: Added Range#getJoined() method for joining ranges. (commit)
  • image: Introduced the UI for a manual image resizing via a dropdown or standalone buttons. Closes #5201. (commit)
  • image: Introduced the UI for restoring original image size. Closes #5197. (commit)
  • link: Added an icon indicating in the top-right corner of an image that informs the image is linked. Closes #7457. (commit)
  • link: Typing over the selected link will not remove the link itself. Instead, the typed text will replace the link text. Closes #4762. (commit)
  • link: Added the AutoLink feature which replaces a plain text with a link if typed or pasted content is the link. Closes #4715. (commit)
  • page-break: Added support for pasting page breaks from MS Word. Closes #2508. (commit)
  • table: Added option to set heading rows and columns for insertTable command and TableUtils#createTable(). Closes #6768. (commit)
  • typing: Introduced the TwoStepCaretMovement plugin. See #7444. (commit)
  • utils: Introduced the Collection#addMany() method for adding multiple items in a single call. Closes #7627. (commit)
  • utils: Introduced the Collection#change event. See #7627. (commit)
  • widget: Made it possible to disable the WidgetTypeAround plugin on the fly. Closes #6774. (commit)

Bug fixes

  • engine: Fixed incorrect selection fixing in some multi-cell selection scenarios. Closes #7659. (commit)
  • link: After backspacing into a link, the caret should still stay outside the link. Closes #7521. (commit)
  • link: Manual and automatic decorators will work properly with a link on an image. Closes #7519. (commit)
  • link: Fake visual selection should not be added to the editor's data. Closes #7614. (commit)
  • list: Editor should not crash on the Enter keypress inside a to-do list item containing soft-breaks. Closes #5866, #6585. (commit)
  • list: Links inside a to-do list item should be properly converted to HTML. Closes #5779. (commit)
  • media-embed: The editor's placeholder should disappear after inserting media into an empty editor. Closes #1684. (commit)
  • table: Pasting a table into an existing table should not set multi-cell selection if the TableSelection plugin is disabled. Closes #7486. (commit)
  • table: Pasting a table into an existing table with headings should not break table layout. Closes #7453. (commit)
  • table: The table structure should not be changed when removing the heading row. Closes #7454, #7601. (commit)
  • table: Merging cells of multiple whole rows or columns should not crash the editor. (commit)
  • ui: Removing the first hidden (grouped) toolbar button should not throw an exception. Closes #7655. (commit)
  • undo: Undo/redo stacks should be cleared on DataController#set(). Closes #4060. (commit)
  • widget: Resizer#redraw() should not change the editing view unless a different size should be set. Closes #7633. (commit)
  • widget: Triple-clicking inside an image caption should not crash the editor in Firefox. Closes #7542. (commit)
  • widget: Triple-clicking a link inside an image caption should not crash the editor in Safari. Closes #6021. (commit)
  • widget: The resizing mechanism will not trigger other view.Document#mousedown events. Thanks to that while resizing an image inside a cell, the mouse will not trigger the table's actions. Closes #6755. (commit)

Other changes

  • core: Added icons that represent different sizes of an object (object-size-*.svg) (see #7559). (commit)
  • core: The Editor, CommandCollection and MultiCommand's execute() method will the result of the called command.execute(). Closes #7647. (commit)
  • engine: Changed arguments of Element#is(), Text#is(), TextProxy#is(), AttributeElement#is(), ContainerElement#is(), EditableElement#is(), EmptyElement#is(), UIElement#is() methods and all it's usages. Closes #7608. (commit)
  • engine: Added model.Schema instance to downcast conversion API, available under conversionApi.schema. (commit)
  • engine: UpcastHelpers#elementToMarker() is now deprecated. Use UpcastHelpers#dataToMarker() instead. DowncastHelpers#markerToElement() should be used only for editing downcast. (commit)
  • engine: Table cells should not be filled with single spaces while pasting table with empty cells. Closes #7487. (commit)
  • engine: The bindTwoStepCaretToAttribute() engine's utility was removed. See #7444. (commit)
  • image: Allow to configure ImageResize in a more granular way. For example, by combining ImageResizeEditing with ImageResizeHandles or ImageResizeButtons to resize image by handles or by image toolbar UI components (dropdown or standalone buttons) respectively. Closes #7579. (commit)
  • image: Image alignment styles (alignLeft, alignCenter and alignRight) no longer set max-width: 50% of the <figure> element. If you wish them to still do so, add these styles to your content styles. (commit)
  • table: Restoring the document selection to the ranges as they were before undoing table cells merge. Closes #6639. (commit)
  • ui: Improved toolbar rendering time when multiple items are added or removed at once (e.g. during editor initialization). Closes #6194. (commit)
  • Link's attribute element highlight is now inlineHighlight() - a public utility. (commit)

Released packages

Check out the Versioning policy guide for more information.

Released packages (summary)

Major releases (contain major breaking changes):

Minor releases (contain minor breaking changes):

Releases containing new features:

Other releases:

Don't miss a new ckeditor5 release

NewReleases is sending notifications on new releases.