Skip to content

Allow icon customization without webpack-specific plugins #16546

@filipsobol

Description

@filipsobol

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:

  1. 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.
  2. 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 or resolutions 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.

Metadata

Metadata

Assignees

Labels

domain:dxThis issue reports a developer experience problem or possible improvement.domain:integration-dxThis issue reports a problem with the developer experience when integrating CKEditor into a system.package:corepackage:uisquad:platformIssue to be handled by the Platform team.support:2An issue reported by a commercially licensed client.type:improvementThis issue reports a possible enhancement of an existing feature.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions