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

Unify color handling #4592

Open
Comandeer opened this issue Mar 25, 2021 · 2 comments
Open

Unify color handling #4592

Comandeer opened this issue Mar 25, 2021 · 2 comments
Labels
plugin:colorbutton The plugin which probably causes the issue. plugin:colordialog The plugin which probably causes the issue. plugin:tabletools The plugin which probably causes the issue. plugin: uicolor The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:task Any other issue (refactoring, typo fix, etc).

Comments

@Comandeer
Copy link
Member

Type of report

Task

Provide description of the task

See #4351 (comment). Currently we are handling colors in a very convoluted way, with normalizing hexes without hashes and then adding hashes in several places. Probably we should rewrite the whole color handling logic to use CKEDITOR.tools.color.

Other details

  • Installed CKEditor plugins: colorbutton, colordialog
@Comandeer Comandeer added type:task Any other issue (refactoring, typo fix, etc). status:confirmed An issue confirmed by the development team. plugin:tabletools The plugin which probably causes the issue. plugin:colorbutton The plugin which probably causes the issue. plugin: uicolor The plugin which probably causes the issue. plugin:colordialog The plugin which probably causes the issue. size:L labels Mar 25, 2021
@Comandeer
Copy link
Member Author

Proposed changes/additions to the CKEDITOR.tools.color:

  • isValidColor should be a public property (and probably should be called just isValid);
  • checking the validity of the color sounds like a good candidate for a static method,
  • there should be support for hex-like values (fff and ffffff) as we use them everywhere.

@f1ames
Copy link
Contributor

f1ames commented Jun 9, 2021

We had started working on the PR to cover this issue but decided to postpone it due to #4718 (comment).

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. plugin:colordialog The plugin which probably causes the issue. plugin:tabletools The plugin which probably causes the issue. plugin: uicolor The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:task Any other issue (refactoring, typo fix, etc).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants