Archived topic
Disable styling in gutenberg editor
1 reply · Started by Kees on January 23, 2023
Hi,
Is there a way to disable text color styling in the backend editor? If we have a white text. The builder shows a white text on a white background. Do you have a fix for this?
Regards,
Niek
Hi Kees,
You can do so by enqueueing your own style in the Block Editor with the Child theme enabled.
For instance, in your Child Theme directory, you create a new file called my-editor-style.css
Then, add this PHP in functions.php:
add_action( 'enqueue_block_editor_assets', function() {
wp_enqueue_style( 'my-block-editor-styles', get_stylesheet_directory_uri() . "/my-editor-style.css", false,'1.0', 'all' );
} );
Now, in your my-editor-style.css file, you can add CSS like this:
p {
color: #000 !important;
}