• I checked “Load the CSS classes used in editor-style.css and replace the Formats button and sub-menu.” However, the editor-style.css (placed in my child theme) does not appear in my Formats drop down. There are a lot of styles in the Formats dropdown but they seem to be coming from the theme’s main style sheet (not my child theme’s main style sheet nor editor-style.css).

    Any help?

    https://wordpress.org/plugins/tinymce-advanced/

Viewing 10 replies - 1 through 10 (of 10 total)
  • I have this problem to. This bug after add new style in the editor-style.css
    This problem can be solved add “add_editor_style( ‘editor-style-1.css’ );” but new version tinyMCE have “Load the CSS classes used in editor-style.css and replace the Formats button and sub-menu” and style “editor-style-1.css” not load

    Problem is solved. This bug only Firefox, you need remove history in your browser.
    Sorry

    Thread Starter jana11

    (@jana11)

    It is not working for me. Just tried in Safari as well as Firefox.

    Anyone else has this problem? Thanks.

    Plugin Author Andrew Ozz

    (@azaozz)

    @jana11 if you have editor-style.css in your main theme, the styles will be imported from there. There is no need to check the checkbox.

    At present there is no way to bypass the main theme’s editor-styles and only import the styles from the child theme’s editor-styles. Will try to figure out how to add that 🙂

    Joy_M

    (@joy_m)

    Hi Andrew, thank you very much for this plugin, it’s been very helpful for me thus far. just wanted to report that I’m having this issue as well—nothing appears in the “Formats” drop-down, although I’ve added styles to editor-style.css

    I double-checked and there is no editor-style.css in my parent theme. I’m assuming that it keeps trying to pull styles from the nonexistent file in my parent theme. I’d love to stay away from making changes in the parent theme in case of updates, so any guidance you could offer would be greatly appreciated.

    Thanks for your time!

    Plugin Author Andrew Ozz

    (@azaozz)

    WP should find and load editor-style.css from the child theme. Did you add add_editor_style(); to the child theme’s functions.php?

    Hey,

    i have similar problem, the editor-style.css is loading fine and i can see it’s effect as i’m typing,

    if: when i select “Load the CSS classes used in editor-style.css and replace the Formats button and sub-menu.”
    then: the format menu is BLANK

    expected to have the styles from “editor-style.css” there.

    ANY HELP PLZ?

    also looks like the plugin is preventing adding styles button via functions.php

    I have this problem too.
    I don’t want editor-style.css to replace formats menu. I just want those css classes to append or add to formats menu.

    I have editor-style.css.
    Did add add_editor_style(get_stylesheet_directory_uri() . '/editor-style.css');.
    Also enable: List Style Options. checked.

    But nothing were added to formats menu.

    How to add classes to somewhere in TinyMCE menu?

    I am also with this problem.

    I think it is because of TinyMCE v.4.
    I found the way to fix this.

    add these code into some where such as theme or plugin.

    add_action('admin_init', function() {add_editor_style(get_stylesheet_directory_uri() . '/css/editor-style.css');});
    
    function someTinymceInit()
    {
        $style_formats = [
            [
                'title' => 'Class or style name,
                'selector' => 'p',
                'classes' => 'css_class',
                'wrapper' => true,
            ],
            [
                'title' => 'Class or style name,
                'selector' => 'p',
                'classes' => 'css_class',
                'wrapper' => true,
            ],
        ];
    
        $settings['style_formats_merge'] = true;// merge set to true, overwrite set to false
    
        $settings['style_formats'] = json_encode($style_formats);
    
        return $settings;
    }// someTinymceInit
    add_filter('tiny_mce_before_init', 'someTinymceInit');
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘editor-style.css does not replace Formats drop down’ is closed to new replies.