-
-
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
Expose item reconversion for post-fixers #8252
Comments
Programmatic reconversionTechnical Story: ckeditor5#8252 Context and Problem StatementThe Declarative reconversion using triggerB PR handled reconversion using The go-to mechanism for reconversion should still be the Decision Drivers
Considered Options
Pros and Cons of the OptionsHandle reconversion by
|
During the F2F talk with @Reinmar, we identified that the most desired option would be an option that adds However, this will not handle the case of paragraph reconversion. This is because how the paragraph is rendered is determined not only by the paragraph's attributes but as well on the number of siblings. This would be very tricky to handle elegantly as it would require to:
The other approach is to use event + reasonable method. We can listen to document's The best place for a new method is The next thing to remember is to align this to our _way of doing things_™ we could wrap all this logic into a The rationale for this is that model post-fixers (an approach used in tables for reconverting model to view) should, well, fix the model. |
To put this a bit differently – using such a callback in
👍
If plugging this code at the right stage (it should be, IMO, after post fixers but right before we start conversion) would require using a priority, I think we should have additional So, while I wasn't sure during our call whether we need a new method, I'd say now that we should have it. To make sure those callbacks are called exactly when needed.
👍 |
PS. We will also need to have more useful methods in the Differ to simplify the code detecting whether something needs to happen. This will benefit both – these "preconverters" and "postfixers". BTW, I like the term "preconverter" :D |
DUP of #10360 |
📝 Provide a description of the improvement
After #6510 there's no programatic way to trigger element reconversion. The reconversion can only be started using
triggerBy
option.Questions to answer:
Differ.refreshItem()
(does insert + remove) but I think this is not a good place.Additionally, use this API in table cell refresh post-fixer instead of
Differ.refreshItem()
If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: