Site logo

Archived topic

Gutenburg editor style

13 replies · Started by epickenyan on February 18, 2019

Viewing posts 1–14 of 14

Hi. The headings in gutenburg editor are showing in caps. Is there a way to remove that styling? I want the capitalization to only show on the front end. Also, I see there is no styling for h5 so it is hard to recognize the heading from the editor when applied. I am assuming these styles are theme specific?

Hi there,

GeneratePress will try to make the editor look exactly like the frontend. Are you only wanting to the page title to be non-caps, or all H1 elements?

The h5 styling in the editor should take your styling from the Customizer as well.

Let me know :)

I realized the point you just said when I checked the a links which I set to black on all areas except single posts also showing as black on the editor. Any way to separate this styling (frontend and back end)?

Not currently, but we'll be implementing a filter in GP 2.3 that will allow you to disable the color settings in the editor.

We can add CSS to the editor if you need though, we just need to know which elements to target.

For now, the elements are the title and a links.

Try this:

add_action( 'enqueue_block_editor_assets', function() {
    $css = '.editor-post-title__block .editor-post-title__input {text-transform: none;}';
    $css .= '.editor-block-list__block a, .editor-block-list__block a:visited {color: #000000;}';

    wp_add_inline_style( 'generate-block-editor-styles', $css );
}, 100 );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know :)

That worked, thanks.

You're welcome :)

So with 2.3 update I will have to remove this code and use the hooks instead?

Hi there,

in 2.3 there will be an option available in the editor. So you will be able to remove that code and just activate the editor setting.

Okay, thanks.

You're welcome

Im with GP 2.3.2
How can I do that?

I want a neutral style in editor, not the fronted style

Thanks

Hi there,

Give this a shot:

add_filter( 'generate_show_block_editor_styles', '__return_false' );

This archived topic is closed to new replies.