Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Josh

    (@josh401)

    Hmmm… very good question!

    Let me look into this and see what I can find. The “kitchen sink” is default wordpress behavior.

    Perhaps I could add a button in the plugin to disable the kitchen sink feature and display row 2 by default.

    I’ll have to do some research and post back here.

    I haven’t tested this, so you might want to dummy check it. You need to set ‘wordpress_adv_hidden’ => false for the tinymce init to make it auto show. You can hook it like so:

    function my_mce_options( $init ) {
        $init['wordpress_adv_hidden'] = false;
        return $init;
    }
    add_filter('tiny_mce_before_init', 'my_mce_options');
    Plugin Author Josh

    (@josh401)

    Handy Dandy snippet, right there!! I haven’t tested it yet, but I see no reason why it wouldn’t work. I’ll have to add this as an option to my plugin.

    Thanks mslocum

    I just tested it, added to my functions.php, it didn’t seem to have any affect at all.

    hmmm. Hard to say cw17s0n. If you are using other tinymce plugins they might be hooking the function after you. I would try and hook it later and see if that helps.

    add_filter('tiny_mce_before_init', 'my_mce_options', 100);

    Also, The buttons should be defined as a comma delimited string in $init[‘theme_advanced_buttons1’], $init[‘theme_advanced_buttons2’], etc.

    Also WordPress remembers your previous editor settings. It looks like it stores it in a cookie and then stores it in the database. I think it is called ‘hidetb’. Something like this might work to override it, but once again I haven’t tested this…just an idea to check. Try putting this in a <script> tag after var userSettings.

    userSettings.hidetb = 0;

    You could also snoop around in the database and figure out how to hook the user settings and change it there, but javascript might be better.

    Plugin Author Josh

    (@josh401)

    Okay, I’ve tested around with this a little.

    What the code provided by mslocum does is “force” wordpress to always instantiate the tinymce editor with the second row already expanded.

    The show/hide kitchen sink button can still be clicked, and it will hide the second row… but if you save, and come back to the post/page… the editor will always “show” row 2 by default.

    It does appear that the open/close status is stored in the database.

    One option seems to be to use the code from above, and then remove the button from the editor for show/hide kitchen sink. This way, the editor is defaulted to always displaying all rows.

    I’ll have to play around a bit and report back, just did it on a new site I started today, and it worked fine, so I may have something going on with the first site I tested it on.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Ultimate TinyMCE] kitchen sink’ is closed to new replies.