Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add options to wysiwyg Wordpress
// Options wisywg
add_filter('mce_buttons_2', function( $buttons ) {
array_shift( $buttons );
array_unshift( $buttons, 'fontsizeselect');
return $buttons;
} );
add_filter( 'tiny_mce_before_init', function( $initArray ){
$initArray['theme_advanced_font_sizes'] = "9px 10px 12px 13px 14px 16px 18px 22px 24px 28px 32px 36px";
$initArray['fontsize_formats'] = "9px 10px 12px 13px 14px 16px 18px 22px 24px 28px 32px 36px";
return $initArray;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment