≡ Menu

Soon there will be book reviews! (Thank you Tablepress!)

I am embarrassed to admit this, but one of the reasons I haven’t posted book reviews in a while is in wordpress it is difficult to make tables well.

A good 2 column table is the perfect format for displaying capsule book reviews. The left cell contains the cover art; the right cell contains the actual review. In my previous capsule book reviews, I did put everything in a table; it looks ok (but rather crappy). At the same time, it was tedious and confusing to make just a two column table. The rich text editor strips paragraph tags and puts br tags in strange places.  In the source html you can format things perfectly, but if you want to edit it in the rich text editor, you can only edit the table stripped of paragraph tags. You’re constantly trying to guess what the rich text editor will do to your original source.

The other problem is proper styling. It’s not easy to make css for just that table, especially if your class declarations are rather complicated. Also, it is hard to add images in the rich text editor for a table you are editing on the desktop. It also provides a decent preview mode

I’ve just spent the last hour testing Tablepress, a wordpress plugin which is designed to solve precisely these problems and more. It provides a better table wizard (and some cool javascript tricks for sorting rows and colunns). It also gives you option for importing tables (HTML or CSV)  and for inserting images or accessing the rich text editor from the table editor.  I think its primary use is to display tabular data, but it also is a time-saver for making simple tables whose function is simply to display text more efficiently.

My method now is to create the table offline, import the file into the Tablepress plugin, and then within Tablepress table to manually insert the images. All this looks relatively easy to maintain, with the only down side being that the tables aren’t actually included in posts, but inserted as shortcodes into posts.  I suspect that will cause migration issues if you are migrating into another CMS, but then again, I’m almost feeling that wordpress will be here forever.

Two weeks ago I was horrified to discover that creating the simple three row table in the middle of this blog post took hours to get right. Partly it had to do with the fact that the theme I was using had messed up CSS, but it was also cumbersome to test properly. I still need to update the shopping cart page, and preliminary efforts ended up breaking the original table.

You wouldn’t think that HTML tables are very important any more, especially not ones you have to make manually. But having the ability to make boxes and two columns really makes layout easier, and wordpress just makes simple tables impossible to do right. One underlying problem is that WordPress expects bloggers to use the rich text editor inside the browser instead of a special desktop client.  Tiny MCE is good and powerful, but there are many times when I want to use neither the visual editor or even the text editor within the browser. Tablepress lets me import code directly, and that is good.

Anyway, expect much more book reviews (and something very soon!)

Update: I did produce the book review page, and it was very easy to do, but I noticed some oddities. First, Tablepress translated line breaks literally instead of ignoring them within a P tag.  So you need to make sure you eliminate all carriage returns. (My Oxygen XML Editor does a “pretty formatting” for XML which apparently enters carriage returns). Second, importing tables into Tablepress ignores the custom classes. Third, Tablepress has a button to open the Advanced Editor, and I ended up doing this a lot. Fourth, I didn’t bother to make code for images in my table before importing. I just added the graphics to Tablepress (which was pretty easy).

{ 0 comments… add one }

Leave a Comment