job.answiz.com
  • 4
Votes
name

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.

My function.php

  <?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");

 ?>

There are quite a few options you can choose from but I will mention some of the better options. This isn't an exhaustive list.

The choices above are some of the best free and premium plugins you can use. They are actively maintained and all extremely popular.

Hopefully this helps.

  • 1
Reply Report

I had clean new install no plugins or other themes installed and the same problem.

I compared 2 different sites’ tables. One site with a working Visual Editor (and updated to new WP version) and the new one not.

In table <usermeta> of the “working site” I found record <rich_editing = true> for my user id.
The new site did not have that one. After adding that record into the table the visual editor started showing up again.

umeta_id > [new number]
user_id > [my user id]
meta_key > “rich_editing”
meta_value > “true”

INSERT INTO [TABLEPREFIX]_usermeta (umeta_iduser_idmeta_keymeta_value) VALUES (NULL, ‘[YOUR_ID]’, ‘rich_editing’, ‘true’);

So I hope that might work out for you too.

  • 1
Reply Report

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

  • 4
Reply Report