Skip to content
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

Conversion utilities: Unify parameters received by callbacks in downcast and upcast configuration #4274

Closed
scofalik opened this issue Feb 9, 2018 · 1 comment · Fixed by ckeditor/ckeditor5-engine#1314
Assignees
Milestone

Comments

@scofalik
Copy link
Contributor

scofalik commented Feb 9, 2018

Follow-up to ckeditor/ckeditor5-engine#1274.

Right now, in element-to-element conversion, if we pass a callback creating an element, the callback is called with different parameters for upcasting and downcasting.

For downcasting it is ( modelItem, consumable, conversionApi ).

For upcasting it is ( viewItem, modelWriter ).

We should unify them. Callbacks for downcasting are fired like this because of the good-ol' converters we already had. We need to think whether we really need consumable and whole conversionApi in those callbacks. Maybe we will settle on: ( item, writer, conversionApi )?

@pjasiun
Copy link

pjasiun commented Feb 16, 2018

No only callbacks (creators), but also converters API should be unified. Can fix also https://github.com/ckeditor/ckeditor5-engine/issues/1261.

pjasiun referenced this issue in ckeditor/ckeditor5-engine Feb 20, 2018
Other: Moved `consumable` parameter to `conversionApi` parameter in downcast. Closes #1294. Closes #1261.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 14 milestone Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants