how can I style ckeditor5?( background-color and stuff )

I’ve been trying to give background-color to ckeditor but nothing seems to work.

looked at the class names in browser inspect and tried to write style relative to those classes, but it didn’t work. I think it overrides them.

can anyone help me out?

Answer

The background colour of the ckeditor5 window is defined using a CSS variable like this:

.ck.ck-editor__main>.ck-editor__editable {
    background: var(--ck-color-base-background);
    border-radius: 0;
}

You can customise the appearance but importing a new CSS file that overwrites these variables. They provide a good guide here: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/ui/theme-customization.html