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

Error in ckeditor5-editor.css #16670

Closed
Anthony-Wratpor opened this issue Jul 4, 2024 · 3 comments
Closed

Error in ckeditor5-editor.css #16670

Anthony-Wratpor opened this issue Jul 4, 2024 · 3 comments
Assignees
Labels
domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@Anthony-Wratpor
Copy link

Anthony-Wratpor commented Jul 4, 2024

📝 Provide detailed reproduction steps (if any)

  1. Following this previous issue of mine [bug] Ckeditor broken afet angular build #16666 and the precious help from @Witoso.
  2. I found a way to keep the css files in the angular build by adding them in the "styles" array of my angular.json.
  3. But then it won't build because of a css error in the ckeditor5-editor.css file
  4. I opened the css file (node_modules\ckeditor5\dist\ckeditor5-editor.css) and my IDE tells me that there is 128 errors on this file
  5. it's because this instruction should be in one line :
background-image: url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px);
transform: translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>ADDRESS</text></svg>);

But there is a carriage return just after "clip-path: inset(-3px);" and it's done 43 times in the whole file.

I know that it's the problem because if i modify the file it all works great again.

It's a pretty easy fix but i'll keep the css file in my project until this issue is fixed.

@Anthony-Wratpor Anthony-Wratpor added the type:bug This issue reports a buggy (incorrect) behavior. label Jul 4, 2024
@Witoso
Copy link
Member

Witoso commented Jul 4, 2024

I confirm:

@Witoso Witoso added domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. squad:core Issue to be handled by the Core team. labels Jul 4, 2024
@pszczesniak pszczesniak self-assigned this Jul 4, 2024
@pszczesniak
Copy link
Contributor

Library to parse CSS that we use to split the CSS into editor and content part is adding a new line after each CSS definition that it found. Unfortunately when there is a data:image as a background-image with inline SVG that contains style attribute with CSS definitions it also tries to add new line after each definition. That makes the CSS corrupted.

Fix is on the way, stay tuned.

pszczesniak added a commit to ckeditor/ckeditor5-dev that referenced this issue Jul 4, 2024
Fix: Should not corrupt the CSS code during splitting CSS into editor and content files. See ckeditor/ckeditor5#16670.
@filipsobol
Copy link
Member

This problem has been fixed in the just released version 42.0.1.

We noticed that there is a slight visual difference between using ckeditor5.css and using ckeditor5-editor.css + ckeditor5-content.css, but it shouldn't be a problem for most projects. We hope to have this fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

5 participants