You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Image plugin - sometimes can be not fit for custom purpose.
For example: adding custom tags inside figuge tag, or custom attibutes to img tag.
It is often tasks.
And best approach for that case - extend logic with micro custom plugins. And CKE5 architecture provides api for extending Image with other custom plugins...
But currently Image-plugin in some places in source code - blocking that.
Downcast logic in source code in several places:
constimgView=figureView.getChild(0)
It found here: src/image/utils.js and src/imageupload/imageuploadediting.jsand here src/imageupload/imageuploadprogress.js.
But if we want to extend Image... this code will cause for strange behaviour (for example if we are inserting some tags before the img tag).
In next place there is better approach, that provide ability to extending:
// Find an image element inside the figure element.constviewImage=Array.from(data.viewItem.getChildren()).find(viewChild=>viewChild.is('img'));
Image plugin - sometimes can be not fit for custom purpose.
For example: adding custom tags inside figuge tag, or custom attibutes to img tag.
It is often tasks.
And best approach for that case - extend logic with micro custom plugins. And CKE5 architecture provides api for extending Image with other custom plugins...
But currently Image-plugin in some places in source code - blocking that.
Downcast logic in source code in several places:
It found here:
src/image/utils.js
andsrc/imageupload/imageuploadediting.js
and heresrc/imageupload/imageuploadprogress.js
.But if we want to extend Image... this code will cause for strange behaviour (for example if we are inserting some tags before the img tag).
In next place there is better approach, that provide ability to extending:
Found here: https://github.com/ckeditor/ckeditor5-image/blob/0a6902af1d58c192aaccd432ffbb05a5ef1b5675/src/image/converters.js#L38
I offer update Image plugin in several places with last approach. It can solve many problems (in our cases) with extending Image.
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: