Site logo

[Support request] Disable styling in gutenberg editor

Home Forums Support [Support request] Disable styling in gutenberg editor

Home Forums Support Disable styling in gutenberg editor

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2505492
    Kees

    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

    #2505502
    Fernando
    Customer Support

    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;
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.