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

ImageInsert loaded before Image throws #15869

Closed
pomek opened this issue Feb 16, 2024 · 0 comments Β· Fixed by #15881
Closed

ImageInsert loaded before Image throws #15869

pomek opened this issue Feb 16, 2024 · 0 comments Β· Fixed by #15881
Labels
squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@pomek
Copy link
Member

pomek commented Feb 16, 2024

πŸ“ Provide detailed reproduction steps (if any)

Create an instance of a classic editor with the following plugins:

[ 'ImageInsert', 'Image' ]

βœ”οΈ Expected result

No error.

❌ Actual result

imageinsert.js:59 CKEditorError: observable-bind-to-parse-error
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-observable-bind-to-parse-error
    at observablemixin.ts:611:1
    at Array.forEach (<anonymous>)
    at parseBindToArgs (observablemixin.ts:604:1)
    at Object.bindTo [as to] (observablemixin.ts:463:1)
    at Object.bindToMany [as toMany] (observablemixin.ts:539:1)
    at ImageInsertUI._createToolbarComponent (imageinsertui.ts:179:1)
    at Object.componentCreator [as callback] (imageinsertui.ts:99:1)
    at ComponentFactory.create (componentfactory.ts:108:1)
    at toolbarview.ts:349:1
    at Array.map (<anonymous>)

const observables = integrations.map( ( { observable } ) => observable );

image

❓ Possible solution

Perhaps ImageInsert should verify if any image plugin is loaded, as for the following combinations:

  • [ Image, ImageInsert ]
  • [ ImageBlock, ImageInsert ]
  • [ ImageInline, ImageInsert ]

The editor renders properly.

const observables = integrations.map( ( { observable } ) => observable );

image

@pomek pomek added type:bug This issue reports a buggy (incorrect) behavior. squad:core Issue to be handled by the Core team. labels Feb 16, 2024
pomek added a commit that referenced this issue Feb 19, 2024
Fix (image): Fixes the initialization of `ImageInsertViaUrlUI` so it does not depend on configured plugins order. Closes #15869.
@CKEditorBot CKEditorBot added this to the iteration 72 milestone Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants