At the moment, the TinyMCE module allows admins to either enable or disable "tablecontrols". This, in turn, either enables or disables the entire group of table-related buttons (add row, delete row etc). The problem with this is that the entire set of table-related buttons is very large and takes up a lot of space on the page! Only the "table" button is really required as all the other functions (add row, delete column etc) can be done by right-clicking on an existing table.
I would propose that the option to enable or disable the "table" button should be included by default. The "table" button simply allows the creation of a table. Changing the properties of an existing table can be done by right-clicking on the existing table.
This way, admins can either select the "tablecontrols" option (which adds every table-related button) or they can just select "table" which adds just one button.
The patch simply requires the change of one line of code in the plugin_reg.php file:
Change this line:
$plugins['table'] = array();
$plugins['table']['theme_advanced_buttons3'] = array('tablecontrols');
To this:
$plugins['table'] = array();
$plugins['table']['theme_advanced_buttons3'] = array('tablecontrols', 'table');
Or, for complete control over the table buttons, change to this:
<? $plugins['table'] = array();
$plugins['table']['theme_advanced_buttons3'] = array('tablecontrols', 'table', 'row_props', 'cell_props', 'delete_col', 'delete_row', 'delete_table', 'col_after', 'col_before', 'row_after', 'row_before', 'split_cells', 'merge_cells'); ?>
Many thanks,
Jack
Comments
Comment #1
dan_aka_jack CreditAttribution: dan_aka_jack commentedI would also propose that we set some defaults for the table's border and cell padding so the tables look roughly like most users would expect a table to look like (from applications like MS Word etc). To set the default, we just need to add two lines to the pling_reg.php file:
Many thanks,
Jack
Comment #2
nicoloye CreditAttribution: nicoloye as a volunteer commented