Closed frague59 closed 1 month ago
I'm not sure which branch of the ternary operator I should use.
@frague59 thanks :) according to the linked issue the problem comes from passing the wrong parameter in the callback for the formset event, wouldn't it be enough to change line 156 django.jQuery(document).on("formset:added", createEditors);
to django.jQuery(document).on("formset:added", () => createEditors());
then ? :) Could you test if that's already enough to make it work ?
Thanks for your quick answer.
I've tried the proposed patch about django.jQuery(document).on("formset:added", () => createEditors());
, but I've still an issue about the element.matches(query)
not defined in the browser, at the CKEditor creation. Editor is created, but the other handlers bound to the formset:added
event are failing.
Thanks for your quick answer.
I've tried the proposed patch about
django.jQuery(document).on("formset:added", () => createEditors());
, but I've still an issue about theelement.matches(query)
not defined in the browser, at the CKEditor creation. Editor is created, but the other handlers bound to theformset:added
event are failing.
@frague59 thanks for testing. Interesting that it doesn't fix it. Could you test a again and simply remove that line completely? I'm not actually sure that's the cause of the issue, it might be the MutationObserver
. Is your project public so we can test ourselves?
I've tested with django.jQuery(document).on("formset:added", () => createEditors());
, it works for my usage. I'll propose another PR.
Add a try/catch block in the
resolveElementArray
function to avoid issues on CKEditor initialization. See https://github.com/feincms/django-content-editor/issues/30#issuecomment-2379439783Fixes https://github.com/hvlads/django-ckeditor-5/issues/253