-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Currently, the only way to customize icons is to use webpack-specific NormalModuleReplacementPlugin
. However, this doesn't work with the new installation methods, which are bundler-agnostic.
We have had some discussions about how to allow replacing icons in NIM, and the first step would be to move all icons to a new package that only re-exports icons individually (not grouped into a single JavaScript object). This would allow icons to be tree-shaken by the bundlers when not used.
The next step is not clear yet, as there are two possible approaches:
- Icons should behave like new translations and be passed to the editor configuration. This way, most people can pass the default icons, but those who want customization can pass a custom set of icons.
- Plugins should import icons from the new package, and the developers who want to change them can use the
override
option available in npm and pnpm orresolutions
available in yarn to override the icons package with their own custom package.
The first approach provides a better developer experience at the cost of introducing breaking changes for all developers using CKEditor5.
The second approach introduces a smaller breaking change that doesn't affect the majority of the projects, but at the cost of the worst developer experience for those who customize icons.