-
-
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
Consider simplifying attribute conversion #4063
Comments
@scofalik asked me:
cc @szymonkups – there was some reason AFAIR. But you're right that my ticket should be about improving the builder as well. |
If I remember correctly, with builder we cannot specify that we want to convert attributes from certain element type only. For example: "convert |
I can also see that there is |
I was mentioning this here: https://github.com/ckeditor/ckeditor5-engine/issues/736. |
Code sample that we need to improve: https://github.com/ckeditor/ckeditor5-image/pull/32/files#diff-181a641e45476f54a783a7ad41ed6f5bR101 |
Fixed by ckeditor/ckeditor5-engine#1274 and other refactoring tickets. |
Looking at the image feature converters I particularly didn't like this piece:
Couldn't we have just one event and the type of change as a data property? Could we simplify that consumable check code too? Maybe we could also have a shorthand method in
Element
– likeupdateAttribute()
to avoid having to use bothremove/setAttribute()
methods.The text was updated successfully, but these errors were encountered: