CKEditor code element missing styles

Changed

Context

There are styles in ckeditor, but not when displayed.

CKEditor missing code styles
https://contrib.drupalarchitect.info/project/drupal-architect/task/179-…

Questions

How to use the same styles?

Issues

View on Drupal.org #3449576Ckeditor Style plugin forces span definition element giving side effects Status: Active

View on Drupal.org #3410100[10.2 regression] CKEditor 5 breaks when "Source"/Source editing button is added and "Manually editable HTML tags" are specified Status: Needs work

View on Drupal.org #3415178[10.2 regression] CKEditor 5 prevents Styles from adding span as allowed HTML Status: Needs work

Findings

These inline styles are from ckeditor.

.ck-content code {
 background-color:hsla(0,0%,78%,.3);
 border-radius:2px;
 padding:.15em
}
.ck.ck-editor__editable .ck-code_selected {
 background-color:hsla(0,0%,78%,.5)
}

Override by prefixing with .ck.

Resolution

Fixed background color utility and copied to ckeditor stylesheet.

Task type
Project
Topics
Modules