-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New reconversion system #11211
Merged
Merged
New reconversion system #11211
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…erting elements (text nodes are not supported).
Internal (engine): Replaced `conversionApi.slotFor()` in `elementToStructure` with `writer.createSlot()`. Closes #11179.
…-element-to-structure
…lement-to-structure Internal (engine): `elementToStructure()` should throw when invoked for an element that allows `$text`. Closes #11163.
… that allows $text"
…wed-text-in-element-to-structure Revert (engine): Reverted #11229 due to concerns in `Widget` tests.
dawidurbanski
commented
Feb 8, 2022
… element that allows $text""
…hildren were produced as a workaround for elementToStructure() disallowing conversion of model elements with $text.
…re() is impossible.
…11163-disallowed-text-in-element-to-structure Internal (engine): `elementToStructure()` should throw when invoked for an element that allows `$text`. Closes #11163.
10 tasks
…slot Internal (image): Refactor `createBlockImageViewElement()` helper function.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Suggested merge commit message (convention)
Feature (engine): The
DowncastWriter#createContainerElement()
should accept a list of children so bigger view structures can be created in one call. Closes #10714.Feature (engine): The
elementToElement
downcast helper will log a console warning if multiple elements have been created. Closes #10610.Feature (engine): The
DowncastDispatcher
will throw an error if any of the model items were not consumed while converting. Closes #10377.Feature (engine): Introducing
convertItem()
,convertChildren()
andconvertAttributes()
in the downcast conversion API interface.Feature (engine): Added support for reconversion in
DowncastHelpers#elementToElement()
downcast helper. Closes #10359.Feature (engine): Added
DowncastHelpers#elementToStructure()
downcast helper with reconversion support. Closes #10358.Feature (engine): It's now possible to trigger a nested conversion while downcasting an element.
Docs (engine): Overhauled the conversion documentation and introduced the documentation for conversion helpers. Closes #10294.
Internal (engine):
elementToStructure()
should throw when invoked for an element that allows$text
. Closes #11163.Internal (engine): Replaced
conversionApi.slotFor()
inelementToStructure
withwriter.createSlot()
. Closes #11179.Internal (engine): Reconversion helpers can coexist with
Differ#refreshItem()
children.Other (engine): Implemented the EditingController#reconvertMarker() method to be used instead of Writer#updateMarker() for marker reconversion purposes. Implemented the EditingController#reconvertItem() method to replace Differ#refreshItem(). Closes #10659.
Other (engine): The attribute and child nodes conversion events are fired by the lowest priority handler for the insert event instead of by
DowncastDispatcher
itself. Closes #10376.Other (engine): Events are fired by the
DowncastDispatcher
even if they were previously consumed. It's the conversion handler's responsibility to check if it can be consumed or if it was already consumed by other converters.Other (engine): The
DowncastDispatcher#convert()
method introduced as a replacement to previously usedconvertInsert()
. The new method handles not only nodes conversion but also markers.Internal (horizontal-line): The
horizontalLine
element downcast conversion has been changed fromelementToElement
toelementToStructure
.Internal (html-support): HTML elements downcast conversion have been changed from
elementToElement
toelementToStructure
.Internal (image): The
imageBlock
andimageInline
elements downcast conversion have been changed fromelementToElement
toelementToStructure
.Internal (link): Link
inlineWidget
element downcast conversion has been changed fromelementToElement
toelementToStructure
.Internal (media-embed): The
media
element downcast conversion has been changed fromelementToElement
toelementToStructure
.Internal (page-break): The
pageBreak
element downcast conversion has been changed fromelementToElement
toelementToStructure
.Internal (widget): The
blockWidget
andinlineWidget
elements downcast conversion have been changed fromelementToElement
toelementToStructure
.Internal (heading): Added missing consuming converter.
Internal (heading): Code adjusted to changes in
DowncastDispatcher
API.Internal (html-embed): Code adjusted to the removal of
triggerBy
conversion option.Other (list): The
ckeditor5-list
package was restructured into subdirectories. Closes #10811.Other (list): Downcast conversion should consume downcasted attributes.
Other (table): Table downcast conversion migrated to
elementToStructure()
downcast helper. Closes #10502.Tests (clipboard): Added missing downcast conversion.
Tests (image): Tests updated to properly handle non-consumed errors fired by the
DowncastDispatcher
.Tests (alignment, autoformat, block-quote, engine, html-support, image, indent, table, word-count): Tests updated after list package restructuring.
Tests (html-support): Fixed test for checking if an attribute was consumed while converting.
Docs (ckeditor5): Links in the migration guide point to the new conversion documentation.
MAJOR BREAKING CHANGE (list): The
ListEditing
,ListUI
,ListStyleEditing
,ListStyleUI
,TodoListEditing
,TodoListUI
plugins were moved to the dedicated subdirectories (list
,liststyle
,todolist
).MAJOR BREAKING CHANGE (engine): Removed the Differ#refreshItem() method from the public API. Replaced by EditingController#reconvertItem() (see #10659).
MAJOR BREAKING CHANGE (engine): The
DowncastDispatcher
will throw an error if any of the model items were not consumed while converting. Read theconversion-model-consumable-not-consumed
error documentation for more information.MAJOR BREAKING CHANGE (engine): The
DowncastDispatcher#conversionApi
property is no longer available. The instances ofDowncastConversionApi
being created at the start of conversion.MAJOR BREAKING CHANGE (engine): The support for the
triggerBy
option for downcast helpers is removed and replaced with the newelementToStructure()
options.MINOR BREAKING CHANGE (media-embed): The
createMediaFigureElement
helper function first argument has been changed fromwriter
object toconversionApi
object.MINOR BREAKING CHANGE (table): The downcast converters of the table feature has been rewritten with the use of
elementToStructure()
and the re-conversion mechanism. See #10502.