add_editor_style not working

I created a style sheet

editor-style.css

I want to load this css file using add_editor_style() function,

In my functions.php

function my_theme_add_editor_styles() {
    add_editor_style( 'css/editor-style.css' );
}
add_action( 'after_setup_theme', 'my_theme_add_editor_styles' );

I also tried this solution

add_editor_style is not loading in frontend. Any solution?

3 Answers
3

You shouldn’t need an action to add an editor style. Simple add the following anywhere in your functions.php:

add_editor_style('css/editor-style.css');

Leave a Comment