Archived topic
Background Color issues in WP Editor
5 replies · Started by Kirsty on July 31, 2021
I'm having issues with the WP editor where the default text color is super pale, and the title is White on White Background - so unable to see the text or the cursor.
This is a new issue for this particular website that has a dark background set via GP customiser. I have updated to the latest GP theme and doesn’t solve the issue. I also tried changing the background color of the editor via a editor stylesheet but it doesn’t seem to register…
How can I fix this?
Hi there,
would you want a 'dark' background in the editor ? Or just to fix the content title ?
I think dark background would be best. I tried to change the bg to a dark color using add_editor_style() but it didn’t register… maybe because the parent generatepress theme sets this too? What’s the best way to go about setting a dark editor bg?
Try this Snippet:
add_action( 'enqueue_block_editor_assets', function() {
$css = 'body .block-editor__container .editor-styles-wrapper{background-color: #ff0000;}';
wp_add_inline_style( 'generate-block-editor-styles', $css );
}, 100 );
Thanks David! worked a treat :)
Glad to hear that!