00 Votes

TinyMCE: Show "Clear Formatting"-Button in Toolbar

Question by Guest | 2014-05-06 at 15:41

In the menu bar of TinyMCE, you can find an option to remove the formatting of the selected text (clear Formatting). Gladly, I would like to hide the whole menu and display a button on the toolbar instead with which you can remove the formatting.

Is it somehow possible to place this function on the toolbar instead of the menubar and to hide the menu at the same time?

ReplyPositiveNegative
2Best Answer2 Votes

This is possible without any problems. During initialization of TinyMCE, you can exactly specify after "toolbar" which buttons should be displayed there. The button for deleting the formatting can be included with "removeformat":

tinymce.init({
  selector: "textarea",
  menubar: false,
  toolbar: "bold italic | removeformat"
}); 

In this example, first, we set "menubar" to "false". With this, the menubar will be hidden.

At one go, we insert two groups of buttons to our toolbar. One group with the buttons for bold and italic formatting, another one with our "removeformat"- button.

A full list with all TinyMCE that are available can be found here.
2014-05-06 at 18:21

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.