Inserting a table

Permalink 1 user found helpful
I'm aware of the fact that the table tab is not that popular anymore but how do I insert a table?

A page I'm taking care of contains a lot of number (interest rates, stock prices and stuff like that). For that I need a table?

Maybe a table block would be nice that contains a little spreadsheet..?

Any ideas about that?

Remo
 
Remo replied on at Permalink Reply
Remo
does no one have to publish a couple of numbers in a table?
MetalOnes replied on at Permalink Reply
MetalOnes
You could add a Content block, and then click the HTML button in the TinyMCE editor and create your table in there. I know thats not the same as a separate table block, but it should accomplish what you want to do.
andrew replied on at Permalink Reply
andrew
With instructions on this page:

http://www.concrete5.org/index.php?cID=372...

I honestly can't recall off the top of my head whether adding table support to our instance of TinyMCE would be as simple as specifying another plugin, or if the interface itself would have to be modified.
Remo replied on at Permalink Reply
Remo
@MetalOnes: That's not a way that's acceptable for me. At least a little bit userfriendly would be nice...

I'll try that Andrew but I still consider creating my own block since that would make it easier to control the layout. I could even add some options like - auto filter, sort...
ScottC replied on at Permalink Reply
ScottC
Hi Remo, definitely a block. I know ASP.net *ducks* had several controls that dealt with this, perhaps there is an equivalent for php, I am sure cakePHP has something to at least get you in the ballpark on your code.
Remo replied on at Permalink Reply
Remo
do you mean something like thishttp://rodotelmi.rebstech.com/2008/08/13/cakephp-and-extjs-grid-edi... which would make it even possible to edit the data?

I tried to find a few cakePhp examples but couldn't find a nice one. I don't want to use cakePhp but I tried to get a few ideas out of it.

I'll try to find some spare time next week to build a table block...
andrew replied on at Permalink Reply
andrew
Heh, I didn't realize: I thought you did mean enabling specific table controls in the text editor.

A table block - a datagrid - is an interesting idea.
Remo replied on at Permalink Reply
Remo
Well I was talking about inserting a table first.. Table in TinyMCE or a DataGrid Block..

One way or another!

I'm just too busy right now, looks like November and December are going to be crazy, guess that block has to wait for a while..
vercasson replied on at Permalink Reply
vercasson
Edit concrete/blocks/content/editior_init.php

Modify two lines:

Within "plugins" add two items (contextmenu,table) like below:

plugins: "inlinepopups,spellchecker,safari,advlink,contextmenu,table",

Within "theme_concrete_buttons2_add" add one item to the end (table) like below:

theme_concrete_buttons2_add : "spellchecker,table",

This is the best way to add support for tables without adding all the formatting table buttons. To format the table use the context menu that will show with a ctrl-click on the table





fff
Cyberdave replied on at Permalink Reply
Cyberdave
I have tried this, but I cannot get it to work. Has the method changed for 5.4? Thanks
cvoogt replied on at Permalink Reply
cvoogt
Same here. I can't add tables using the editor ... and can't expect my customers to enter straight HTML ..
prestressed replied on at Permalink Best Answer Reply
prestressed
I have just struggled to get the table controls in without idiot-proof instructions!
Finally achieved as follows. Hope this helps someone else.

Go to Sitewide Settings / Rich Text Editor (at the bottom right).
Select Custom under Toolbar Set.
Add table to the second line, so that instead of

theme : "concrete",
plugins: "inlinepopups,spellchecker,safari,advlink",

you have
theme : "concrete",
plugins: "inlinepopups,spellchecker,safari,advlink,table",

Then, either within theme_concrete_buttons1 : (1st row buttons)
or theme_concrete_buttons2 : (2nd row buttons)
you will need to put either table (for just the 'insert table' option as vercasson says above) or tablecontrols (for the whole set of controls).

Or you can use any subset of tablecontrols (seehttp://www.tinymce.com/wiki.php/Plugin:table)...

For example, I set the editor up as follows:

theme_concrete_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,|,table,cell_props,delete_col,delete_row,col_after,col_before,
row_after,row_before,|,styleselect,formatselect",
theme_concrete_buttons2 : "undo,redo,|,bullist,numlist,|,outdent,indent,|,hr,|,link,unlink,anchor,image,|,cleanup,code",
prestressed replied on at Permalink Reply
prestressed
Just in case someone else upgrades to 5.6 and finds their TinyMCE editing toolbar has vanished, here's a quick update to this post - on upgrading from 5.5 to 5.6, some of my Custom Toolbars (set up more or less as described above) ceased to work completely - the TinyMCE icons all disappeared and you could only see HTML when you tried to edit a content block.

Can't put my finger on exactly what the upgrade wouldn't play nice with, but for example it seems to want a theme_concrete_buttons3 line (I cheated and typed theme_concrete_buttons3 : "", which seems OK)
anyway after mucking about with various settings a bit I got the icons back again and they seem to work fine.