1

I've added more buttons to a TinyMCE instance using the new Javascript API available since WordPress version 4.8.

As you can see in the following code block, I could add more buttons but I'm not able to add the headings/paragraph/pre dropdown menu. How do I add it?

wp.editor.initialize( 'editor-id', {
    mediaButtons: true,
    tinymce:      {
        toolbar1: 'bold,italic,bullist,numlist,link,blockquote,alignleft,aligncenter,alignright,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,undo,redo'
    },
    quicktags:    true,
} );

Short.

I have this:

enter image description here

I want to add this menu:

enter image description here

  • 2
    try with formatselect – mmm Nov 22 '17 at 16:14
  • @mmm , Excellent. That;s it. Please create an answer on this page, so I can mark it as resolved and you'll earn the reputation. – Andrei Surdu Nov 22 '17 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.