tomusborne / generatepress

452 stars 89 forks source link

Better solution for editor width on single posts or custom post types using content templates #560

Open eastriverstudio opened 1 year ago

eastriverstudio commented 1 year ago

When using GB content templates combined with GP's layout element I find it slightly frustrating that I can't control the editor default width for example when a full width layout element is active so a single post or post type can be assigned to a GB content template that can span full width.

In general it makes sense that assigning a layout will alter the editor to match, particularly for pages where I'll assign it so I can use GB containers for sections at full width without template constraints.

However in other cases it doesn't, a good use case is posts or any content where a custom content template is active. In this case I might have designed a fixed content template with a sidebar or specific elements where the main content doesn't span full width, so when adding the content in the editor having it span full width is not necessary and makes it difficult for the user formatting it to relate how it will look on the front-end.

At the moment this can be fixed by adding some custom css to the editor that targets the specific post type to restrict the editor width but this is fiddly if a site has mulitple post types using content templates and feels like a hack.

Therefore it would be much better to have a solution to this in the GP settings somewhere (on the layout or content template block Element possibly?) so we can set the editor width independently if we only want the full-width to apply on the front-end whilst having a defined width applied to constrain the editor's view.

Thanks