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

onChangeInitializedEditors isn't fired during startup #552

Open
glynam1 opened this issue Nov 5, 2024 · 2 comments
Open

onChangeInitializedEditors isn't fired during startup #552

glynam1 opened this issue Nov 5, 2024 · 2 comments
Assignees

Comments

@glynam1
Copy link

glynam1 commented Nov 5, 2024

I have a component like

      <>
          <CKEditorContext
            context={DecoupledEditor.Context}
            contextWatchdog={DecoupledEditor.ContextWatchdog}
            config={contextConfig}
            onReady={(context: any, watchdog: any) => {
              console.log(context)
            } }
            onChangeInitializedEditors={ editors => {
              console.log( editors );
            }}
            onError={(error: any, details: any) => {
              console.log(error)
              console.log(details);
            }}
          >
            {document.sections.map((section) => (
              <SectionedContentEditor
                key={`sectionEditor${section.position}`}
                section={section}
                handleAutoSave={handleAutoSave}
              />
            ))}
          </CKEditorContext>
      </>

and child

<CKEditor
          editor={DecoupledEditor}
          config={config}
          contextItemMetadata={{
            name: `Section${section.position}`,
          }}
          onError={(error: any, details: any) => {
            console.log(error)
            console.log(details);
          }}
        />

When using Ckeditor v43.3.0 and ckeditor-react v9.1.0 (or even latest)

This event does not fire. I have tried debugging it and the callback is set up but then the callback from the editor never seems to be fired.

Any insight?

@Mati365 Mati365 self-assigned this Nov 6, 2024
@glynam1
Copy link
Author

glynam1 commented Nov 6, 2024

To add to this, I've added onReady to the child CKeditor instance, and that callback fires.

@Mati365
Copy link
Member

Mati365 commented Nov 6, 2024

@glynam1 Hi! Can you prepare minimal stackblitz demo with your setup? 🙏 It will help me with debugging this. I checked this today with ClassicEditor and it was working correctly, so it may be related to specific configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants