[Resolved] Gutenburg editor style

Home Forums Support [Resolved] Gutenburg editor style

Home Forums Support Gutenburg editor style

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #813254
    epickenyan

    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?

    #813724
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #813733
    epickenyan

    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)?

    #814074
    Tom
    Lead Developer
    Lead Developer

    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.

    #814203
    epickenyan

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

    #814717
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #814766
    epickenyan

    That worked, thanks.

    #814978
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #815110
    epickenyan

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

    #815277
    David
    Staff
    Customer Support

    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.

    #815351
    epickenyan

    Okay, thanks.

    #815358
    David
    Staff
    Customer Support

    You’re welcome

    #1042076
    Matias

    Im with GP 2.3.2
    How can I do that?

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

    Thanks

    #1042609
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Give this a shot:

    add_filter( 'generate_show_block_editor_styles', '__return_false' );

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.