add_editor_style example

$editor_stylesheet_path = './assets/css/style-editor.css';

        // Note, the is_IE global variable is defined by WordPress and is used         // to detect if the current browser is internet explorer.         global $is_IE;
        if ( $is_IE ) {
            $editor_stylesheet_path = './assets/css/ie-editor.css';
        }

        // Enqueue editor styles.         add_editor_style( $editor_stylesheet_path );

        // Add custom editor font sizes.         add_theme_support(
            'editor-font-sizes',
            array(
                array(
                    'name'      => esc_html__( 'Extra small', 'twentytwentyone' ),
                    'shortName' => esc_html_x( 'XS', 'Font size', 'twentytwentyone' ),
                    'size'      => 16,
                    'slug'      => 'extra-small',
                ),
                

    function twentytwentytwo_support() {

        // Add support for block styles.         add_theme_support( 'wp-block-styles' );

        // Enqueue editor styles.         add_editor_style( 'style.css' );

    }

endif;

add_action( 'after_setup_theme', 'twentytwentytwo_support' );

if ( ! function_exists( 'twentytwentytwo_styles' ) ) :

    /** * Enqueue styles. * * @since Twenty Twenty-Two 1.0 * * @return void */
Home | Imprint | This part of the site doesn't use cookies.