how to add buttons to wordpress wysiwyg editor

how to add buttons to wordpress wysiwyg editor

You can add buttons to wordpress wysiwyg editor using following code. For changing wordpress wysiwyg editor, we need to use the quick_tags.js file using hook.

how to add buttons to wordpress wysiwyg editor

But from wordpress 3.1 version we can customize the wordpress editor by using wordpress filter.

Adding more buttons to the editor is really easy. Simply paste this snippet into your theme’s functions.php file.

function enable_more_buttons($buttons) {
 $buttons[] = 'hr';
 $buttons[] = 'sub';
 $buttons[] = 'sup';
 $buttons[] = 'fontselect';
 $buttons[] = 'fontsizeselect';
 $buttons[] = 'cleanup';
 $buttons[] = 'styleselect';
 return $buttons;
}
add_filter("mce_buttons_3", "enable_more_buttons");
how to add buttons to wordpress wysiwyg editor
how to add buttons to wordpress wysiwyg editor

Note: If you are not wordpress developer then do not use above code. Ask your developers to do this for you.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

4 thoughts on “how to add buttons to wordpress wysiwyg editor”

Leave a Reply

Your email address will not be published.