• Resolved mklandwp

    (@mklandwp)


    Hi, Dear WP’s developer

    Now I use new the WP5.9,
    I found the editor’s style is different with theme’s look.(for example P.font-size, max-width…)
    My theme’s functions.php have used API ”add_editor_style”
    But in WP5.9, It looks not work.

    Is still I can use API”add_editor_style” to add custom style in theme’s functions.php?

    best regards

    • This topic was modified 3 years, 1 month ago by mklandwp.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mklandwp

    (@mklandwp)

    sorry , I got it.

    add custom style for classic editor use this way:

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

    But add custom style for block editor, must use

    
    add_theme_support('editor-styles');
    add_editor_style('editor-style.css');
    
    Thread Starter mklandwp

    (@mklandwp)

    It’s resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP5.9,Is still I can use API”add_editor_style” to add custom style?’ is closed to new replies.