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

Colorbutton plugin not using additional styles. #5352

Closed
mihilion opened this issue Oct 18, 2022 · 4 comments · Fixed by #5353
Closed

Colorbutton plugin not using additional styles. #5352

mihilion opened this issue Oct 18, 2022 · 4 comments · Fixed by #5353
Labels
plugin:colorbutton The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:feature A feature request.

Comments

@mihilion
Copy link
Contributor

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Create custom css file.
  2. Override style for span.cke_colorbox in custom file.
  3. Use custom file with CKEDITOR.config.contentsCss = ['/path/to/custom.css'];

Expected result

Custom style should be applied to colorbutton plugin.

Actual result

Custom style is not applied to colorbutton plugin

Other details

Reason for that:

panel: {
	css: CKEDITOR.skin.getPath( 'editor' ),

Better solution found in Format plugin

panel: {
	css: [ CKEDITOR.skin.getPath( 'editor' ) ].concat( config.contentsCss ),
@mihilion mihilion added the type:bug A bug. label Oct 18, 2022
@mihilion
Copy link
Contributor Author

I have added proposed change and created a pull request. Looking forward for review and merge.

@github-actions
Copy link

It's been a while since we last heard from you. We are marking this issue as stale due to inactivity. Please provide the requested feedback or the issue will be closed after next 7 days.

@github-actions github-actions bot added the stale The issue / PR will be closed within the next 7 days of inactivity. label Oct 26, 2022
@Comandeer Comandeer added status:confirmed An issue confirmed by the development team. stale The issue / PR will be closed within the next 7 days of inactivity. and removed stale The issue / PR will be closed within the next 7 days of inactivity. labels Oct 26, 2022
@github-actions github-actions bot removed the stale The issue / PR will be closed within the next 7 days of inactivity. label Oct 27, 2022
mihilion added a commit to mihilion/ckeditor4 that referenced this issue Oct 28, 2022
@Comandeer Comandeer added type:feature A feature request. plugin:colorbutton The plugin which probably causes the issue. and removed type:bug A bug. labels Nov 2, 2022
@Comandeer
Copy link
Member

I've changed the issue type to feature request as the proposed solution (using config.contentsCss) would result in a breaking change. The mentioned config variable is used to style the content in the editor, not the UI of the editor. If the user passed a path to the custom stylesheet, it would result in unexpected styling of the color button panel. Therefore, such styling should be implemented as a separate config variable, e.g. config.colorButton_css.

As for using config.contentsCss in the "Format" plugin: this plugin's UI presents styles that can be used in the editor's content. Due to that, it reuses its style to better reflect the end result, e.g. by applying a correct font family.

@mihilion
Copy link
Contributor Author

Ok, PR updated and waiting for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:colorbutton The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:feature A feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants