Enable table parameter in wordpress editor without using plugin

Can someone tell me how to enable table parameter in wordpress editor?

I used the code below to help me include another option, but not for the table.

My .php function

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

 ?>
+4
source share
3 answers

To enable the table option in the Wordpress page editor, you can use the plugin as

1. TablePress

2. TinyMCE

install and activate the plugin, see the documentation on how it works.

TablePress ( TablePress) .
: http://wordpress.org/extend/plugins/tablepress/

2TinyMCE

TinyMCE, , functions.php, : ( Wordpress ).

function enable_more_buttons($buttons) {

$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'styleselect';
$buttons[] = 'backcolor';
$buttons[] = 'newdocument';
$buttons[] = 'cut';
$buttons[] = 'copy';
$buttons[] = 'charmap';
$buttons[] = 'hr';
$buttons[] = 'visualaid';

return $buttons;

}
add_filter("mce_buttons_3", "enable_more_buttons");

, functions.php:

add_filter( 'tiny_mce_before_init', 'myformatTinyMCE' );
function myformatTinyMCE( $in ) {

$in['wordpress_adv_hidden'] = FALSE;

return $in;
}

:: TinyMCE Advanced:: https://wordpress.org/plugins/tinymce-advanced/

+1

Wordpress, .

<table>, <tr>, <td> .

0

Without plug

You need to download the "table" folder from the TinyMCE editor package

https://www.tinymce.com/download/

tinymce -> js -> tinymce -> plugins

And copy it to your folder called 'tinymce-plugins'

Then register js by adding a folder to your wp content

enter image description here

Then in your function.php register click

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! table functionality activated

enter image description here

0
source

All Articles