Skip to content

Pass DOM Element in the config object instead of editor constructor in CKEditor >= 48#663

Merged
Mati365 merged 17 commits intomasterfrom
ck/659
Apr 8, 2026
Merged

Pass DOM Element in the config object instead of editor constructor in CKEditor >= 48#663
Mati365 merged 17 commits intomasterfrom
ck/659

Conversation

@Mati365
Copy link
Copy Markdown
Member

@Mati365 Mati365 commented Mar 25, 2026

🚀 Summary

Pass DOM Element in the config object instead of editor constructor in CKEditor >= 48


📌 Related issues

@Mati365 Mati365 marked this pull request as draft March 25, 2026 12:47
@Mati365 Mati365 marked this pull request as ready for review April 1, 2026 12:26
@Mati365 Mati365 requested a review from gorzelinski April 1, 2026 12:26
Copy link
Copy Markdown
Contributor

@gorzelinski gorzelinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments regarding tests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to add unit tests for this adapter? Something that would be focused on the adapter behavior, like ests/EditorWatchdogAdapter.test.tsx.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add a describe block with API signature tests, like:

  • v48 path (elementConfigAttachment: true)
  • legacy path (elementConfigAttachment: false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/ckeditor/ckeditor5-react/pull/663/changes#r3049668330

Maybe we could add a similar test block here:

  • editor.create(config) when elementConfigAttachment is enabled.
  • editor.create(initialData, config) when it is disabled.

Copy link
Copy Markdown
Contributor

@gorzelinski gorzelinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I clicked around, did some testing, and it looks ok.

@Mati365 Mati365 merged commit 3145bae into master Apr 8, 2026
5 checks passed
@Mati365 Mati365 deleted the ck/659 branch April 8, 2026 11:04
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

Successfully merging this pull request may close these issues.

[React] Pass DOM Element in the config object instead of editor constructor in CKEditor >= 48

2 participants