Ultimate TinyMCE
[resolved] kitchen sink (8 posts)

  1. nagol81
    Posted 3 years ago #

    Hi, if i want to delete kitchen sink button and show by default all row how can i do?

    thank you.


  2. Josh (WP Edit)
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    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.

  3. mslocum
    Posted 3 years ago #

    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');
  4. Josh (WP Edit)
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    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

  5. cw17s0n
    Posted 3 years ago #

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

  6. mslocum
    Posted 3 years ago #

    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.

  7. Josh (WP Edit)
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    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.

  8. cw17s0n
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ultimate TinyMCE
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic