Deprecated: Assigning the return value of new by reference is deprecated in /f2/blendedtechnologies/public/wp-content/plugins/pmetrics.php on line 1192
Blended Technologies » Blog Archive » Introducing TableGen - The HTML Table Generator

Introducing TableGen - The HTML Table Generator

First the solution:

TableGen
TableGen The Table Generator



Now the problem it solves:

I created a website with WordPress for a small business. My goal was for the non-technical managers of the business to be able to run the content side of the website themselves. Everything was working great until they decided that they wanted to put up some tables of data on the website. Now WordPress doesn’t have a table creation feature in its minimal WYSIWYG editor so we tried the following unsuccessful methods of getting a table into WordPress:

  1. First they started making the tables in Word and pasting them in, but it generated HTML with lots of styling cruft which created a lot of strange problems.
    Strange Problems
  2. Next I thought there should be an online table generator out there that would work, but all of them I found had one problem or another. E.g. making users manually edit the generated HTML to fill in their content (this was common), Not telling the user what to do or what she will get, or writing javascript to the window with a hideous blue background (not sure that one counts as a table generator) to name a few.
    tablenstrange.png
  3. Finally I considered having them use a desktop HTML editor such as NVU and copy its HTML into the WordPress window, but I went through the steps and even NVU wouldn’t quite make a plain vanilla table with no styling. And I’m not comfortable telling someone to go into NVU, select the HTML tab, copy from where it says table but not before, be sure to include the brackets… and so on. That’s just too much.

So at that point TableGen was born. Check out the results.

Now that they are pasting plain vanilla HTML tables onto the site, I can set up a stylesheet that can make the tables pretty.

More details:
It was created in pure Python in 3 hours. It should have been 1 hour but I forgot some HTML basics and a few Python CGI basics. It worked out to be about 200 LOC which did seem a bit wordy for such a simple concept in a high level langauge.

Please try it out and provide some feedback if you’d like. I’m willing to add a few more features such as width but if you want much more than that then this tool isn’t for you. It targets the Just-Give-Me-A-Frikin-Table market.

Tags: , , , ,

del.icio.us |  Digg |  FURL |  Yahoo! My Web 2.0 |  Reddit

6 Responses to “Introducing TableGen - The HTML Table Generator”

  1. chris Says:

    WordPress 2.x uses TinyMCE which has a build-in table editor. Only necessery change would be to adjust the default editing template to use the TinyMCE advanced layout and just put in the buttons you need. Maybe too “difficult” to edit for non-technical managers but still much more powerful than TableGen. Also stuff light cell alignment etc is possible.
    Any reason not to use that solution?

  2. Greg - CEO/Founder Says:

    Chris,

    I didn’t know about this built in table editor in WordPress. It sounds a little tricky to get set up but I’ll certainly give it a try. I wonder why they don’t have that turned on by default.

  3. Greg - CEO/Founder Says:

    I gave the TinyMCE table editor a try. I think that it is going to work. My only complaints which are not critical are that there is no way to specify the table header row and also that it’s tricky to delete a table in the editor.

    I don’t know if I’d reccomend going the TinyMCE table editor route only because it’s a BEAR to set up! Hopefully WordPress will start including more TinyMCE plugins in future releases.

    Anyway if you want to set it up see these two posts:
    A manual route to setting it up which is the way I did it.
    A plugin that almost worked for me (be sure to read ALL the comments on that page for it to work at all!)

    Sorry, I can’t write up a detailed tutorial like I’d like but I think this process will change with every version change of TinyMCE and/or WordPress :-(

  4. Crazyhorse Says:

    Hi,

    I found your table tool while doing a search for google. However, I’m interested to see the python file if possible as its not something I’ve come across before and want to learn more.

    Is that something you could provide?

  5. Greg - CEO/Founder Says:

    Crazyhorse,

    Here you go, Tablegen is now open source. Let me know if you need any help understanding it.

  6. Programming Tutorials Says:

    Programming Tutorials…

    I couldn’t understand some parts of this article, but it sounds interesting…