Yoni Baciu
Yoni Baciu

Reputation: 2707

Is there a way to wrap the toolbar buttons to the next row in TinyMCE if the width of the editor is too small?

I am using TinyMCE in advanced theme. Today I must specify in advance the buttons in each toolbar row: theme_advanced_buttons1, theme_advanced_buttons2 and theme_advanced_buttons3.

Is there a way to just specify a single list of buttons and let the buttons wrap to the next row if the width of the editor is too small to contain them all in a single line?

Upvotes: 10

Views: 11964

Answers (6)

Mario
Mario

Reputation: 185

It is not possible when using inline mode.

Upvotes: 0

Thariama
Thariama

Reputation: 50832

No, unfortunately, this is not possible (using Tinymce3). For Tinymce4, this is another issue.

Upvotes: 1

Ice
Ice

Reputation: 1

Works with TinyMCE 3.x

.mceToolbar td {float: left;}

Upvotes: -1

James
James

Reputation: 3805

I'm surprised this wasn't an answer, but I just used:

.mce-btn-group .mce-btn {
    float: left;
}

I only have one toolbar, and on smaller screens it just wraps as needed.

Upvotes: 15

SRB
SRB

Reputation: 1111

It doesn't do it by itself, but in tinyMCE 4.X, you can add multiple toolbars like below

tinymce.init({
        selector: ".tinymce-textarea",
        theme: "modern",
        plugins: [
            "advlist autolink lists link image charmap print preview anchor",
            "searchreplace visualblocks code fullscreen textcolor emoticons",
            "insertdatetime media table contextmenu paste jbimages"//moxiemanager
        ],
        file_browser_callback: false,
        toolbar1: " bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link image media preview ",
        toolbar2: "forecolor backcolor emoticons | jbimages ",
        relative_urls : false

    });

Upvotes: 21

Mikko Rantalainen
Mikko Rantalainen

Reputation: 15935

You can do it the other way around: TinyMCE: How to display all toolbars on a single row?

It will not wrap each button on its own, but I think you can do better that way.

Upvotes: 0

Related Questions