Closed (fixed)
Project:
CKEditor Media Resize
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2023 at 15:07 UTC
Updated:
17 Oct 2023 at 05:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sebaz commentedAre you trying to use it with CKEditor 5? Have you read instruction especially:
Comment #3
rgpublicYes, I'm trying to use CKE5. I guess I setup everything correctly. See attached screenshots. Might be wrong though, of course.
Comment #4
s_leu commented@rgpublic Can you check if your site is sending a
Content Security Policyheader? If yes, please try updating the module and check if the problem persists.Comment #5
rgpublic@s_leu: Yes, my site had the csp module installed and a Content Security Policy header. BUT: Usually if there's a violation against a CSP rule it should show up in the browser console. There was no violation. Just to be sure I uninstalled the module and checked that there's no CSP header now. As expected, this didn't help. The problem persists.
The error message "schema-cannot-extend-missing-item {"itemName":"drupalMedia"}" sounds as if it might be a loading order problem. Could it be this plugin here is loaded before the drupalMedia plugin? I found this here:
https://github.com/ckeditor/ckeditor5/issues/12199
There doesn't seem to be a real dependency mechanism in CKE5 between plugins. But the last comment suggest using afterInit() for such purposes. Perhaps you might want to try to move any schema extensions in the afterInit() method? Just a thought...
Comment #7
s_leu commented@rgpublic I finally ran into this too when I disabled another plugin in one of my text format configs. Moving schema and converter registration into the afterInit() hook did the trick. Please check and confirm if it solves your issue too.
Comment #8
rgpublic@s_leu: Yes, it works now with the branch. Wonderful. Thank you so much! Would be great if you could release a new version. (I still think CKE5 should one day have a better way to define those dependencies so I'll live a comment there).
Comment #10
s_leu commentedThanks for checking again @rgpublic, merged this now.