In latest version of Wygwam for EE: can I add a custom class to a table without going into view source mode? I am thinking something similar to links, where I can click on the advanced tab and set the class, id, etc. But for tables, there is nothing similar... My clients are not good at viewing or changing source, so this feature would really help if it's available.

1 Answer 1


This is something I had as well , I have created a custom style for tables which my users added by just adding the name to stylesheet classes under the advanced tab. This is a pain and I contacted pixel and tonic about it and they said it was dropped by ckeditor in the latest version and so it was dropped from wygwam too.

This happened to me before where the save button was dropped by ckeditor/wygwam so i had to bring it into my setup as a plugin as featured here.

Adding CKEditor Plugins to Wygwam

I just haven't got around to see if i can do the same thing for the advanced tab. Also be aware that ckeditor and wygwam have brought back icons and features that were dropped from earlier versions (like the div icon) so it may still be brought back in a future version

  • thanks for the info bhackett... i'll take a look at the custom style solution.
    – dcpl
    Commented Jun 26, 2014 at 14:53
  • FYI bhackett, I'm not sure if you've tried it yet, but this worked for me, and is almost as easy as a separate tab for setting the class... create a custom styleset: docs.pixelandtonic.com/wygwam/using/style_set.html and make sure you have a custom styleset rule for tables in there like this: { name: 'My Table', element: 'table', attributes: {'class': 'my_table'} } then in wygwam, create a table. Then CLICK on the table, then click on "styles" in the menu bar and pull down to "My Table". If you view source now you'll see that the class was added to it.
    – dcpl
    Commented Jun 27, 2014 at 7:21
  • ps - it's important to click on the table before clicking on the Styles drop down, otherwise the "My Table" style won't even appear as an option... I was confused at first, but that's just how it works.
    – dcpl
    Commented Jun 27, 2014 at 7:23
  • Thanks dcpl that's a really clever way of approaching it
    – bhackett
    Commented Jul 8, 2014 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.