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

Issue when adding media with multiple instances in the same block #175

Closed
markhollis opened this issue Nov 5, 2024 · 0 comments
Closed
Labels
issue: bug Something isn't working

Comments

@markhollis
Copy link

Describe the bug
When adding media to a block of content containing multiple instances of the CKEditor, it will always add to the last block of the chain.

To Reproduce
Steps to reproduce the behavior:

  1. Add multiple CKEditor instances in a single Content Type.
  2. Click on 'Add Media' and add an image to the first CKEditor in the chain.
  3. See that the image has now appeared in the last CKEditor in the chain.

Expected behavior
The media should add to the same instance which it is added to.

Screenshots
image

Plugin: strapi-plugin-ckeditor: "^3.0.5"

Additional context
There may be an issue with a global or singleton reference to the media lib plugin: https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/components/Input/plugins/StrapiMediaLib.js

Regarding the global reference to plugins here, it is possible each editor inits a new plugin instance, but there's a global singleton reference and the last one is used.

@nshenderov nshenderov added the issue: bug Something isn't working label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants