Create a gist now

Instantly share code, notes, and snippets.

Embed
Customize TinyMCE of Theme Blvd `editor` type options to be more like the default WP editor. Requies Theme Blvd Framework 2.7.2+.
<?php
/**
* Customize TinyMCE plugins with Theme Blvd `editor`
* type options.
*/
function my_editor_tinymce_plugins( $plugins ) {
$plugins = array(
'charmap',
'colorpicker',
'hr',
'lists',
'media',
'paste',
'tabfocus',
'textcolor',
'fullscreen',
'wordpress',
'wpautoresize',
'wpeditimage',
'wpemoji',
'wpgallery',
'wplink',
'wpdialogs',
'wptextpattern',
'wpview',
'image',
);
return $plugins;
}
add_filter( 'themeblvd_editor_tinymce_plugins', 'my_editor_tinymce_plugins' );
/**
* Customize TinyMCE buttons with Theme Blvd `editor`
* type options.
*/
function my_editor_tinymce_toolbar( $buttons ) {
// First row of buttons.
$buttons['toolbar1'] = array(
'formatselect',
'bold',
'italic',
'bullist',
'numlist',
'blockquote',
'alignleft',
'aligncenter',
'alignright',
'link',
'wp_more',
'spellchecker',
'wp_adv',
);
// Second row of buttons.
$buttons['toolbar2'] = array(
'strikethrough',
'hr',
'forecolor',
'pastetext',
'removeformat',
'charmap',
'outdent',
'indent',
'undo',
'redo',
'wp_help',
);
return $buttons;
}
add_filter( 'themeblvd_editor_tinymce_toolbar', 'my_editor_tinymce_toolbar' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment