Closed frame-fF closed 1 year ago
Create a CSS file named custom.css
and place it in your project's static files directory. The location could be something like static/css/custom.css
.
Open the custom.css
file in a text editor.
Add your custom CSS rules to modify the desired styles. For example, to change the background color, you can use the following CSS rule:
.ck-content {
background-color: ...;
}
Replace ...
with the desired background color value.
Save the custom.css
file.
Update your settings.py
file with the correct path to the custom.css
file:
CKEDITOR_5_CUSTOM_CSS = "css/custom.css"
Note: Adjust the file path according to the location of the custom.css
file relative to your static files directory.
Save the changes in settings.py
.
Ensure that your Django project is configured to serve static files correctly, and that the CKEDITOR_5_CUSTOM_CSS
path matches the actual location of the custom.css
file.
After making these changes, the CKEditor instances in your Django project should apply the styles defined in the custom.css
file, including the desired background color modifications.
How do I change the theme or background color?