I use class=”highlight” and have a light-gray background to highlight paragraphs. Then I’ve got a class=”golden” for pro tips in my blog posts. Both work fine in published posts.
When I’m actually editing the post – using a Gutenberg classic block – the only color that shows during editing is from the highlight class, as a bluish-gray color. My golden class or any other color doesn’t show, which makes it hard to see what’s happening.
So my question is: how do I edit the Gutenberg block classic editor itself to show my alternative classes?
Ideally it would show the actual colors, but even if it just shows gray for every class, at least I’d be able to see the paragraph was correctly highlighted, as in the image.
Sorry if this is outside the scope of GeneratePress, but I’d be grateful if you can help or point me in the right direction.
1. Create a file called style-editor.css and place it in your child theme ideally.
2. For Gutenberg place this code in child theme’s functions.php: add_theme_support( ‘editor-styles’ );
3. For Gutenberg and Classic users place this in your child theme’s functions.php: add_editor_style( ‘style-editor.css’ );
4. Finally add your CSS styles to your newly-created style-editor.css file from option 1.