[Resolved] Gutenberg code editor supper narrow

Home Forums Support [Resolved] Gutenberg code editor supper narrow

Home Forums Support Gutenberg code editor supper narrow

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #835191
    Paul

    See screenshot here: https://www.screencast.com/t/tFvsvzEAP

    This is really annoying when working with long articles, as I have to scroll like a madman and I can only have a small part of the article in view at once.

    I read this about changing the width: https://wordpress.org/gutenberg/handbook/designers-developers/developers/themes/theme-support/#changing-the-width-of-the-editor

    But I don’t see a style-editor.css file in GP.

    Anyway, how can I set the code editor to a workable length?

    #835780
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try adding this function to your site:

    add_action( 'enqueue_block_editor_assets', function() {
        wp_add_inline_style( 'generate-block-editor-styles', 'body .edit-post-text-editor {max-width: 800px;}' );
    } );

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

    Let me know if that helps or not ๐Ÿ™‚

    #838894
    Paul

    Thanks Tom, unfortunately I had to switch back to the classic editor, because I had the Gutenberg failing to update posts bug for some of my posts.

    That’s why I’m late to reply, because frankly I haven’t tried if it works yet.

    I will keep it handy in the back of my mind though, for when I do eventually switch over to Gutenberg.

    Thanks

    #838947
    Tom
    Lead Developer
    Lead Developer

    Sounds good ๐Ÿ™‚

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