Can anybody tell me that how can I enable the option of table in wordpress editor?
I used below code which help me to enable other option, but not for the table.
<?php
function add_more_buttons($buttons) {
$buttons[] = 'hr';
$buttons[] = 'del';
$buttons[] = 'sub';
$buttons[] = 'sup';
$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'cleanup';
$buttons[] = 'tablecontrols';
return $buttons;
}
add_filter("mce_buttons_3", "add_more_buttons");
?>
Without a Plugin
You need to download the "table" folder from the TinyMCE editor package
https://www.tinymce.com/download/
tinymce -> js -> tinymce -> plugins
And copy it into your own folder called 'tinymce-plugins'
Then register the js by adding the folder to your wp-content
Then in your function.php register the button
function add_the_table_button( $buttons ) {
array_push( $buttons, 'separator', 'table' );
return $buttons;
}
add_filter( 'mce_buttons', 'add_the_table_button' );
function add_the_table_plugin( $plugins ) {
$plugins['table'] = content_url() . '/tinymce-plugins/table/plugin.min.js';
return $plugins;
}
add_filter( 'mce_external_plugins', 'add_the_table_plugin' );
Then BOOM! the table functionality is activated
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With