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:
- A convenient UI for changing the image's width to a predefined size.
- Autolinking URLs and emails in editor content.
- Distinguishing between inside and outside
<code>
. - Better experience when replacing (typing over) a link text.
We fixed also a handful of bug fixes, for example:
- Calling the
editor.setData()
will now also clear the undo stack. - Linking to a part of to-do list item.
- Automatic link decorators in case of a linked image.
Finally, we also took care of some developer experience-oriented improvements:
- We changed marker conversion, so that it doesn't break HTML structure in some cases.
- Introduced a new
RawElement
class to make it simpler to implement features like "embedding raw HTML".
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()
andTextProxy#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()
orContainerElement#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 ofnode.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 toDomConverter#getHostViewElement()
because now it supports bothUIElement
andRawElement
(see #4469).
MINOR BREAKING CHANGES ℹ️
- engine: The
bindTwoStepCaretToAttribute()
utility function has been removed. Useeditor.plugins.get( TwoStepCaretMovement ).registerAttribute()
instead. - table: The
findAncestor()
utility function was removed. - table: The parameters of
TableUtils#createTable()
has changed. Useoptions
object to pass number ofrows
andcolumns
. - table: The
removeEmptyRows()
andremoveEmptyRowsColumns()
utility functions does not require thebatch
parameter any more. - table: The
downcastTableHeadingRowsChange()
downcast converter has been removed. It is no longer possible to overrideheadingRows
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 theDowncastWriter#createRawElement()
method. Closes #4469. (commit) - engine: The method
DataController#set()
is now decorated so plugins can listen toeditor.setData()
calls. (commit) - engine: Introduced a new marker conversion helpers that produce semantic HTML data output. See
DowncastHelpers#markerToData()
andUpcastHelpers#dataToMarker()
. Closes #7556. (commit) - engine: Added model
Position#findAncestor()
andElement#findAncestor()
methods. Closes #3233. (commit) - engine: Changed the visibility scope of
Mapper#findPositionIn()
fromprivate
topublic
. (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 andTableUtils#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
andMultiCommand
'sexecute()
method will the result of the calledcommand.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 underconversionApi.schema
. (commit) - engine:
UpcastHelpers#elementToMarker()
is now deprecated. UseUpcastHelpers#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 combiningImageResizeEditing
withImageResizeHandles
orImageResizeButtons
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
andalignRight
) no longer setmax-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.
Major releases (contain major breaking changes):
Minor releases (contain minor breaking changes):
Releases containing new features:
Other releases:
Released packages (summary)