Gutenberg: How do I change the width of the editor in guttenberg?

Created on 9 Jan 2019  路  5Comments  路  Source: WordPress/gutenberg

If you have a question you have a few places that you can ask this:

Please can someone point me to an answer. Surely this has been fixed by now? Everything I have searched through is a year out of date. Here is a picture of my screen. Mostly whitespace.
white_space_01

[Type] Help Request

Most helpful comment

Specifically, it's explained here:

https://developer.wordpress.org/block-editor/developers/themes/theme-support/#changing-the-width-of-the-editor

/* Main column width */
.wp-block {
    max-width: 720px;
}

/* Width of "wide" blocks */
.wp-block[data-align="wide"] {
    max-width: 1080px;
}

/* Width of "full-wide" blocks */
.wp-block[data-align="full"] {
    max-width: none;
}

All 5 comments

@VinceGledhill there is currently not a way to change the width of the editor via the user interface itself, however, the editor width can be changed in the theme and that's what @swissspidy has linked to above.

Specifically, it's explained here:

https://developer.wordpress.org/block-editor/developers/themes/theme-support/#changing-the-width-of-the-editor

/* Main column width */
.wp-block {
    max-width: 720px;
}

/* Width of "wide" blocks */
.wp-block[data-align="wide"] {
    max-width: 1080px;
}

/* Width of "full-wide" blocks */
.wp-block[data-align="full"] {
    max-width: none;
}

Is there a separate set of functions for the "Code Editor" width?

I understand this works for the "Visual Editor".

add_action( 'enqueue_block_editor_assets', 'custom_gutenberg_editor_stylesheet' );
function custom_gutenberg_editor_stylesheet() {
  wp_enqueue_style( 'custom-gutenberg-stylesheet', [your css path] . '/gutenberg-styles.css', array(), wp_get_theme()->get( 'Version' ), 'all' );
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasmussen picture jasmussen  路  3Comments

spocke picture spocke  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

davidsword picture davidsword  路  3Comments

ellatrix picture ellatrix  路  3Comments