You may need to use the same approach that conditional editor stylesheets require now (for TinyMCE).
function my_theme_add_editor_styles() {
global $post;
$post_type = get_post_type( $post->ID );
$editor_style="editor-style-" . $post_type . '.css';
add_editor_style( $editor_style );
}
add_action( 'pre_get_posts', 'my_theme_add_editor_styles' );
This snippet is from a Hongkiat article describing the process.
Note: You would then have a different editor stylesheet in your theme directory for each post type:
editor-style-POST_TYPE.css
Using sass/less would make this a little more manageable since you could compile these stylesheets from partials and just add the class that changes the Gutenberg editor width.
Not ideal, but this approach could get the job done.
Related Posts:
- Gutenberg block editor – list of form components for custom blocks
- Adding content in Gutenberg editor
- How to display full width block without toolbar?
- Editor width automatically reduced – text is wrapped after 1 character
- Gutenberg work with Bootstrap Shortcodes plugin
- WordPress Gutenberg home page “edit Page” option missing
- WP 5 how to add_editor_style for both tinyMCE and Gutenberg
- Enable Gutenberg on custom post type
- Disable Visual editor for all users
- Gutenberg editor add a custom category as wrapper for custom blocks
- Why is the visual editor in WordPress limiting the width by wrapping the content?
- Editor removes tags
- Adding a rich text editor to Excerpt
- Disable WYSIWYG editor only when creating a page
- How can i add some static text above the editor?
- Add quicktag buttons to the HTML editor
- Force TinyMCE editor’s “Toolbar Toggle” to be automatically chosen & expanded
- Stop certain classes showing up in TinyMCE Advanced Style dropdown
- Disable the Code View in the content editor?
- Re Order Editor to be after meta box [duplicate]
- post editor changes & to &
- How to add button to post page WordPress 5.x
- If two users attempt to modify a page, does WordPress still work correctly?
- Filter post_content before loading in Gutenberg editor
- Add visual editor capability to custom excerpt window?
- Square brackets make WordPress ignore newline/paragraph
- Text cut off on save
- How to remove specific panels in the editor (Gutenberg) when editing a block (via right panel)?
- How to apply editor filter to posts with a specific custom post type
- How to *disable* the post content editor
- Remove all table widths from editor content
- How do I fix my ‘Path’ field when editing pages via the Dashboard?
- edit posts through front-end
- How to get value of selected page template in Gutenberg editor?
- How to add notice text above Post Editor?
- Cannot access WordPress Appearance → Editor
- How to disable YouTube (and any other oembed) embeding in the editor
- Bulk edit contents of pages
- How to leave a line between paragraphs when writing text in the visual or text editor
- Customize Editor Styles
- Is there any simple way to remove Gutenberg editor H1 H5 H6 and change the label for the rest H2 H3 H4?
- Can the wordpress color palettes by changed through Javascript?
- problem adding code into wp editor for https://wordpress.org/support [closed]
- How can I register a custom “Text Pattern” (WP 4.3) for TinyMCE?
- Open ‘View Page’ Button in Editor in new Tab
- Opening Brackets Do Not Format to Paragraphs in Visual Editor
- Making the Content Editor Box Bigger in 2013
- Why wordpress word count differs from Microsoft word and sites like wordcounter.net
- How to add custom table style for table block in gutenberg editor
- Gutenberg consume wp-json data and reflect in frontend the content
- The simplest way to let clients edit pages
- Page/post editor with syntax highlighting [closed]
- How do you stop WP from stripping code? [closed]
- Unable to edit and see content of pages
- Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
- Problem with some keys when editing HTML in wordpress “text” editor
- Feauterd image meta box not showing up
- Why WordPress not using WP_Filesystem
- Disabled visual editor and WordPress keeps adding line-breaks to my code
- Built-in spell checker not working in WordPress 3.3.1
- How to use numbered lists in the post editor?
- Force WP to ignore multiple whitespaces
- Resize Rich Post Editor in Chrome
- Problem with -> in pre tags
- Change Image Size option in the settings in bulk
- Enable Gutenberg for Woocommerce
- Gutenberg UI has changed
- Is WordPress classical and block editor(s) too inefficient to handle large data?
- How to add text editor field in user edit profile?
- Gutenberg dynamic block render_callback gives null for $post
- Embedding Post Editor Into External Site
- wp_editor() renders outside wrapping div
- Can’t update or publish post/pages with browser Safari
- WordPress page edits are now slow
- Have a website using version 4.9.11 and the Appearance option does not appear on Dashboard
- How to enable error reporting for wp admin section
- Classic Editor text font color is white after installing the latest version of wordpress
- How to hide a field of the editor by default
- Allow contributors to edit their own images
- What’s the best way to trim content from WYSIWYG editor?
- Image Post creates unusual extra HTML
- Why are carriage returns deleted in the editor?
- How to add Thumbnail button in frontend editor
- Inline style appears in the editor but breaks on live site
- Directly open page in text editor
- Contributor post to be reviewed and published by only one editor
- Where Can I Find the Video Player In The Edit Media Screen
- Limit post view and management to custom user meta information
- Why is the text editor linked to the visual editor?
- How i can customize WordPress front page in WP dashboard editor?
- Foliopress WYSIWYG editor does not display images [closed]
- Layout Settings in the new Gutenberg editor
- How do I reinstate the “Add Block” feature that changes with the update?
- How can I reset/remove background colour from a block
- Call API on post save/update and show the result in admin area
- WYSIWYG – Custom field inside link
- Page Edit – Re-arange the order of contents (images, banners, blocks) on a wordpress website
- Customize margin between paragraphs using the Gutenberg Style editor
- how to display gutenberg editor in a view
- How can I edit global styles?