Making Posts editor client friendly

Hi @smontreuil ,

As I happily found out myself, through doing exactly what @Louis described, yes, any styles you apply to the post content block are indeed reflected perfectly in the admin interface.

This allows you to customise each post types editing experience individually to reflect the front-end display. Cwicly global styles are also automatically applied to the editor, so you don’t need to do anything special or extra to make that work.

One trick that I recommend that really worked well (if it is applicable to the blocks you are using in the post content), is to use a universal relative style on the post content block that sets the max-width on all direct children (rather than on the post content block itself).

By doing this, it allows whatever background colour you have applied to the post content block to fill the entire editor, while correctly constraining the blocks inside.

Here are the settings I used to centre the content within the editor to a max-width using a relative style (named All elements).

Screenshot 2023-03-29 at 01.33.56

I hope this gives you some inspiration.

The obvious caveat is that any styles, including max-width you set must also work correctly on the front-end. This is relatively straightforward because the intention is usually to match the editing experience to the front-end display, so as long as you apply those styles using the post content block, everything just works in both places.

1 Like