Release highlights
We are happy to announce the release of CKEditor 5 v34.0.0.
This release introduces the following new features:
- Support for document lists
- Support for the lock mechanism for the
Editor#isReadOnlyproperty - Replacement for the CKEditor 4's styles dropdown feature
- Revision history: efficiency improvements and added the DLL build
- Upgrade to PostCSS 8
There were also a few bug fixes:
- Certain markup no longer breaks the editor when using the GHS feature
- Block insertion annotations are now properly displayed even if there is any annotation afterwards
Read more in: https://ckeditor.com/blog/ckeditor-5-v34.0.0-with-redesigned-lists-new-styles-implementation-and-extended-dll-builds/
Please refer to the Migration to v34.x guide to learn more about these changes.
MAJOR BREAKING CHANGES ℹ️
- The
Editor#isReadOnlyproperty is now not editable directly. Starting this release, the property is controlled byEditor#enableReadOnlyMode( lockId )andEditor#disableReadOnlyMode( lockId ), which allow changing theEditor#isReadOnlystate by more than one feature without collisions. See the migration guide to learn more.
MINOR BREAKING CHANGES ℹ️
- engine: The
isAllowedInsideAttributeElementoption has been removed, so theAttributeElementelements can wrap any view element (according to positions). Make sure that you are not wrapping any of theContainerElementelements by accident by not checking the target in the converter. These would previously get wrapped by theAttributeElementelement which would immediately be removed by theContainerElementelement within it so there would be no visible effect. - engine: The handling of
TabandShift+Tabkeystrokes have been switched to the'tab'view document event across the project. If your integration usesKeystrokeHandlerforTabkey handling, we recommend you migrate to the'tab'event to avoid unpredicted errors. - engine: If your integration uses the
Model#insertContent()andfindOptimalInsertionRange()methods to insert widgets into the content, we recommend you migrate your code to theModel#insertObject()method for best results. This is particularly relevant for compatibility with the document lists feature (see #11198). - html-support: The
$htmlSection,$htmlObjectBlock, and$htmlObjectInlineelement types are no longer available for custom elements registered via theregisterBlockElement()method to inherit from. Please use$container,$blockObject, and$inlineObjectinstead (see #11197).
Features
- core: Introduced the lock mechanism for the
Editor#isReadOnlyproperty. The read-only mode can now be separately enabled and disabled by multiple features, which allow for proper control without conflicts between features. Closes #10496. (commit) - core:
MultiCommandnow allows setting the priority (the order) of registered subcommands. Closes #11083. (commit) - engine: Added the new
Model#insertObject()method for inserting elements defined as objects by model schema (see #11198). (commit) - engine: Introduced the inheritable
$container,$blockObject, and$inlineObjectelement types in the modelSchema(see #11197). (commit) - engine: Introduced the
TabObserverobserver that allows listening to pressing down theTabkey in the specified context. (commit) - engine: Added the new
Schema#getAttributesWithProperty()method that retrieves attributes from a node which has a given property (see #11198). (commit) - engine: Added the new
Schema#setAllowedAttributes()method that validates whether attributes are allowed on a given element before setting them (see #11198). (commit) - html-support: Changes to GHS model attributes will be reflected in the editing view (see #5700). (commit)
- html-support: Added support for document list in the
GeneralHtmlSupportfeature. Closes #11454, #11359, #11358. (commit) - list: Introducing the document list feature (multiple blocks per list item). Closes #2973, #10812. (commit)
- list: Introducing the document list properties feature (list styles, start index, reversed list). Closes #11065. (commit)
- paragraph: Added an optional
options.attributesparameter to theInsertParagraphcommand that allows setting attributes on a created paragraph (see #11198). (commit) - style: Implemented the configurable style feature with the style UI dropdown. Closes #5700. (commit)
- theme-lark: Implemented a
.ck-reset_all-excludedCSS class that excludes certain elements from CSS reset. Closes #11451. (commit)
Bug fixes
- engine: Marker changes sometimes did not trigger
change:dataevent which resulted in errors in features using markers (for example, annotations not showing up in the sidebar). (commit) - html-support: GHS should not convert already consumed inline elements (e.g. handled by other editor features). Closes #11447. (commit)
- html-support: Prevent the
TypeErrorerror in themergeViewElementAttributes()function. Closes #10657, #11450, #11477. (commit) - html-support: Skip inline image upcast conversion inside not supported element. Closes #10703. (commit)
- image: The image upcast converter should consume the
[src]attribute. Closes #11530. (commit) - link: The link decorators should be converted on block images only once (should not wrap block image with an additional link). (commit)
- list: Soft enter (
Shift+Enter) is no longer captured by the document list enter key listener, allowing to insert soft breaks in empty list items. Closes #11539. (commit) - list: The view list split converter should not fire if the change was already consumed. Closes #11490. (commit)
- list: List properties should remain the same after a paragraph following a list is toggled into a list item. Closes #11408. (commit)
- pagination: Fixed updating pagination lines after resizing the editing root ancestor.
- revision-history: Editor will not get stuck if the revision diff data could not be loaded due to an error when opening or using the revision viewer.
Other changes
- code-block: The handling of
TabandShift+Tabkeystrokes switched to the'tab'view document event and now respects the event context. (commit) - core: The
Editor#isReadOnlyproperty is now marked as read-only. (commit) - engine: The
Differchange entries forinsertandremovetypes are extended with a map of attributes that were set while inserting an element or that belonged to an element that got removed. (commit) - engine: The
DowncastHelpersare passing an additional parameter to the creator functions (thedatathat provides more context to the element creator callback). (commit) - engine: The
isAllowedInsideAttributeElementoption was removed, from now onAttributeElementsare allowed to wrap any view element. (commit) - engine: The
ConversionApiprovided by theUpcastDispatcherwas extended by an additionalkeepEmptyElement()method that marks an element that was created during splitting a model element that should not get removed on conversion even if it is empty. (commit) - engine: Improved
model.TreeWalker#next()efficiency. See ckeditor/ckeditor5#11463. (commit) - html-support: Updated default schema definitions for various elements taking advantage of the
$container,$blockObject, and$inlineObjectelements in model schema (see #11197). (commit) - media-embed: Added the optional
findOptimalPositionparameter to theinsertMedia()helper that allows for insertingmediamodel element without breaking the content (see #11198). (commit) - revision-history: Improved revision history performance for large documents in the following areas: editor initialization time, revision saving time and revision comparison time.
- revision-history: The
@ckeditor/ckeditor5-revision-historypackage exposes the DLL build. - table: Exports
PlainTableOutputplugin from the table package. Closes #11516. (commit) - watchdog: Improved performance of the
getSubNodes()utility ofWatchdog. (commit) - Updated translations. (commit, commit)
- CKEditor 5 uses
PostCSS@8now. Closes #11460. (commit)
Released packages
Check out the Versioning policy guide for more information.
New packages:
Minor releases (contain minor breaking changes):
Releases containing new features:
Other releases:
Released packages (summary)