The correct way to enqueue an editor stylesheet is as follows:
add_action( 'after_setup_theme', 'generate_child_setup' );
function generate_child_setup()
{
add_editor_style( 'path/to/editor-style.css' );
}
I pulled that snippet from here:
https://generatepress.com/forums/topic/how-to-call-editor-style-css-from-child-theme/#post-149083
I guess the intuitive approach for most would be to enqueue it in the admin but that wouldn’t apply it correctly. I believe add_editor_style()
ensures it’s added to the actual content editor.
Here’s the WordPress Codex page for it: https://developer.wordpress.org/reference/functions/add_editor_style/