Description
Missing imports
We've received reports on our GitHub issue tracker (e.g., issue #17207) about missing code imports after upgrading to CKEditor 5 version 42.0.0 or higher. These issues mainly affect integrators who noticed that certain classes and utilities used for custom plugins and integrations are no longer available for import.
Depending on the integration method, the errors may look different but importing the missing item will always fail in the runtime:
import { LINK_KEYSTROKE } from 'ckeditor5';
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/ckeditor5.js?v=635e45a4' does not provide an export named 'LINK_KEYSTROKE'
This situation is partly due to the migration to TypeScript in version 37.0.0, which introduced import indexes, along with recent changes to installation methods. While these updates aim to simplify CKEditor 5 integration, they have caused some unintended issues for existing setups.
What are we doing about it?
- We are actively working to address this problem, and we review each request for imports and decide if it should be part of the public API of the editor.
- Historically, the editor exposed many internal functions because we provided access to almost all source code. This meant that any function shared across files could be treated as a public API.
- If it's an obvious case, we add the missing export to the indexes right away.
- If we decide not to export a function, we will explain why and provide any possible workarounds (in some cases, better alternatives may be available).
- We are also working on updating our API documentation. Over the next few months, we plan to improve its organization and make it more consistent with the new installation methods.
What can I do as an integrator?
- If you encounter missing imports, please open an issue on our bug tracker listing the imports you need.
- Providing information on how you use these imports and why they are essential will help us understand your needs and shape our API accordingly.
- Licensed CKEditor 5 users can contact us directly for assistance.
- For simple public utilities and types, you may temporarily copy them directly from the editor's source code. Use GitHub's search functionality to locate them in the codebase.
We appreciate your patience as we address these issues and improve the experience for everyone.